ALSA: firewire: isight: bound the sample count to the packet payload
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3a691b28a0ca3cf4d9010c6158318159e0275d2c · < 8e48a29813df8dd71503800b7acf69c12c035045| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: firewire: isight: bound the sample count to the packet payload
isight_packet() takes the frame count from the device iso packet and checks it only against the device claimed iso length.
count = be32_to_cpu(payload->sample_count); if (likely(count <= (length - 16) / 4)) isight_samples(isight, payload->samples, count);
length is the iso header data_length. It can be up to 0xffff. So the gate allows a count up to about 16379. isight_samples() then copies count frames out of payload->samples into the PCM DMA buffer.
payload->samples holds only 2 * MAX_FRAMES_PER_PACKET values. The device multiplexes two samples per frame. A count past MAX_FRAMES_PER_PACKET reads past the payload. A count past the buffer size writes past runtime->dma_area. The smallest PCM buffer is larger than MAX_FRAMES_PER_PACKET. Bounding the count to MAX_FRAMES_PER_PACKET keeps both the read and the write in range.
A malicious or faulty Apple iSight on the FireWire bus reaches this during a normal capture.
Add the MAX_FRAMES_PER_PACKET bound to the gate.
From the CVE record · Linux
The ALSA FireWire iSight driver does not bound a packet’s sample count to its payload. A malicious or faulty Apple iSight device on the FireWire bus can trigger out-of-bounds reads and writes during normal capture. The input does not describe an authentication requirement.
Engineers running Linux kernels with the ALSA FireWire iSight driver should check their systems; affected versions are not specified.