mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
wifi: iwlwifi: fix buffer overflow when firmware reports no channels
On parsing NVM in setting country code, if firmware reports 0 channels, buffer is allocated for 0 rules but a dummy rule is added for cfg80211 compatibility, causing kmemdup() to read 128 bytes from a 32-byte buffer. Allocate regd buffer for one rule addition when reported channels are 0. Signed-off-by: Avinash Bhatt <avinash.bhatt@intel.com> Link: https://patch.msgid.link/20260511203428.e03cd831bc96.I8260d881eebe3e83d3208959b525c51af26414e6@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
parent
06bc6f66ec
commit
45e1a52f65
1 changed files with 11 additions and 10 deletions
Loading…
Add table
Add a link
Reference in a new issue