summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2024-04-24 15:01:01 -0700
committerJohannes Berg <johannes.berg@intel.com>2024-05-03 09:20:26 +0200
commit838c7b8f1f278404d9d684c34a8cb26dc41aaaa1 (patch)
treedda74becf98e11f5e06e983067f2ebca3c0dc75a /drivers/net
parent3d913719df14c28c4d3819e7e6d150760222bda4 (diff)
downloadlinux-838c7b8f1f278404d9d684c34a8cb26dc41aaaa1.tar.gz
linux-838c7b8f1f278404d9d684c34a8cb26dc41aaaa1.tar.bz2
linux-838c7b8f1f278404d9d684c34a8cb26dc41aaaa1.zip
wifi: nl80211: Avoid address calculations via out of bounds array indexing
Before request->channels[] can be used, request->n_channels must be set. Additionally, address calculations for memory after the "channels" array need to be calculated from the allocation base ("request") rather than via the first "out of bounds" index of "channels", otherwise run-time bounds checking will throw a warning. Reported-by: Nathan Chancellor <nathan@kernel.org> Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by") Signed-off-by: Kees Cook <keescook@chromium.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Link: https://msgid.link/20240424220057.work.819-kees@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions