Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] ALSA: bebob/oxfw: bound AV/C response walks to the response length
@ 2026-11-25 12:12 Maoyi Xie
  2026-11-25 12:12 ` [PATCH 1/3] ALSA: bebob: bound the channel position walk " Maoyi Xie
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Maoyi Xie @ 2026-11-25 12:12 UTC (permalink / raw)
  To: Clemens Ladisch, Takashi Sakamoto
  Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, stable

The BeBoB and OXFW drivers walk three AV/C responses by counts that the
device puts into the response. None of the walks is checked against the
length of the response. A count that is too large reads past the
response buffer, or later past a stored copy of the format.

Each patch rejects such a response with -EIO. A complete response is
handled as before. The formats in the Griffin FireWave dump at [1] pass
the new check. I found no such dump of a BeBoB device.

Found with a CodeQL-based static analysis tool that we are developing.
Each case was reproduced in a userspace harness under AddressSanitizer.
Not tested on hardware. Compile-tested with W=1 on next-20261116.

I used an LLM to help write the harnesses and these patches.

[1] https://lore.kernel.org/all/543FD6AA.5080004@sakamocchi.jp/

Maoyi Xie (3):
  ALSA: bebob: bound the channel position walk to the response length
  ALSA: bebob: bound the stream format entries to the response length
  ALSA: oxfw: bound the stream format entries to the response length

 sound/firewire/bebob/bebob.h         |  2 +-
 sound/firewire/bebob/bebob_command.c |  5 +++--
 sound/firewire/bebob/bebob_stream.c  | 15 +++++++++++++--
 sound/firewire/oxfw/oxfw-stream.c    | 22 ++++++++++++++++++++--
 4 files changed, 37 insertions(+), 7 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-25 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 12:12 [PATCH 0/3] ALSA: bebob/oxfw: bound AV/C response walks to the response length Maoyi Xie
2026-11-25 12:12 ` [PATCH 1/3] ALSA: bebob: bound the channel position walk " Maoyi Xie
2026-11-25 12:12 ` [PATCH 2/3] ALSA: bebob: bound the stream format entries " Maoyi Xie
2026-11-25 12:20   ` sashiko-bot
2026-11-25 12:12 ` [PATCH 3/3] ALSA: oxfw: " Maoyi Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox