]> git.ipfire.org Git - thirdparty/iw.git/commit - scan.c
iw: scan: fix buffer over-read in print_ies()
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Sun, 9 Feb 2020 16:58:56 +0000 (17:58 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 13 Feb 2020 18:18:24 +0000 (19:18 +0100)
commitcb13b9dfc0f1625280b5d6ed257b4234d6a6bb6d
tree12fc8a26d8a7ca3b918cefa6850c19e4d6a275d5
parent7d8fcdc8e3acefc0ce169c88c5dd4994e3675696
iw: scan: fix buffer over-read in print_ies()

This patch correctly checks, if enough data bytes for parsing IEs are
present (-2 in check for type and length). Furthermore, it adds a
nullptr and length check to ease future fuzzing.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-3-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
scan.c