From: "Baoli.Zhang" <baoli.zhang@linux.intel.com>
To: vkoul@kernel.org, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.dev, perex@perex.cz,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Baoli.Zhang" <baoli.zhang@linux.intel.com>
Subject: [PATCH v1 0/3] drivers/soundwire: fix memory safety issues
Date: Fri, 20 Mar 2026 13:33:21 +0800 [thread overview]
Message-ID: <20260320053324.738100-1-baoli.zhang@linux.intel.com> (raw)
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
next reply other threads:[~2026-03-20 5:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 5:33 Baoli.Zhang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260320053324.738100-1-baoli.zhang@linux.intel.com \
--to=baoli.zhang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox