CVE-2026-72488: soundwire: fix bug in sdw_add_element_group_count found by syzkaller
In the Linux kernel, the following vulnerability has been resolved:
soundwire: fix bug in sdwaddelementgroupcount found by syzkaller
The original implementation caused an out-of-bounds memory access in the sdwaddelementgroupcount for-loop when i == num.
for (i = 0; i <= num; i++) { if (rate == group->rates[i] && lane == group->lanes[i]) ...
To fix this error, the function now checks for existing rate/lane entries in the group(a function parameter) using a for-loop before adding them.
No functional changes apart from this fix.