Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v1 0/3] drivers/soundwire: fix memory safety issues
@ 2026-03-20  5:33 Baoli.Zhang
  2026-03-20  5:33 ` [PATCH v1 1/3] soundwire: fix bug in sdw_add_element_group_count found by syzkaller Baoli.Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Baoli.Zhang @ 2026-03-20  5:33 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, perex, linux-sound,
	linux-kernel
  Cc: Baoli.Zhang

This patch series fixes three memory-safety issues in
sdw_add_element_group_count() in drivers/soundwire.

1. Fix out-of-bounds memory access caused by incorrect boundary checks.
2. Increase group->max_size only after successful allocation to avoid
   leaving the group's state inconsistent if one allocation fails.
3. Use krealloc_array() to prevent integer overflow.

Baoli.Zhang (3):
  soundwire: fix bug in sdw_add_element_group_count found by syzkaller
  soundwire: increase group->max_size after allocation
  soundwire: use krealloc_array to prevent integer overflow

 .../soundwire/generic_bandwidth_allocation.c  | 44 +++++++++----------
 1 file changed, 20 insertions(+), 24 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-03-20  5:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20  5:33 [PATCH v1 0/3] drivers/soundwire: fix memory safety issues Baoli.Zhang
2026-03-20  5:33 ` [PATCH v1 1/3] soundwire: fix bug in sdw_add_element_group_count found by syzkaller Baoli.Zhang
2026-03-20  5:33 ` [PATCH v1 2/3] soundwire: increase group->max_size after allocation Baoli.Zhang
2026-03-20  5:33 ` [PATCH v1 3/3] soundwire: use krealloc_array to prevent integer overflow Baoli.Zhang

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