summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPavel Skripkin <paskripkin@gmail.com>2021-12-30 22:55:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-25 13:51:51 +0300
commite936e3fd614f0b262780a762c2d6008d6c672991 (patch)
tree6917e9a2bdd562907c210da391cd5c841fbd0c51 /include
parentc5245a6cf83ca5c4b68d643f8b31ed0eb127126e (diff)
downloadlinux-e936e3fd614f0b262780a762c2d6008d6c672991.tar.xz
mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh
commit 8b5cb7e41d9d77ffca036b0239177de123394a55 upstream. Syzbot hit NULL deref in rhashtable_free_and_destroy(). The problem was in mesh_paths and mpp_paths being NULL. mesh_pathtbl_init() could fail in case of memory allocation failure, but nobody cared, since ieee80211_mesh_init_sdata() returns void. It led to leaving 2 pointers as NULL. Syzbot has found null deref on exit path, but it could happen anywhere else, because code assumes these pointers are valid. Since all ieee80211_*_setup_sdata functions are void and do not fail, let's embedd mesh_paths and mpp_paths into parent struct to avoid adding error handling on higher levels and follow the pattern of others setup_sdata functions Fixes: 60854fd94573 ("mac80211: mesh: convert path table to rhashtable") Reported-and-tested-by: syzbot+860268315ba86ea6b96b@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20211230195547.23977-1-paskripkin@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> [pchelkin@ispras.ru: adapt a comment spell fixing issue] Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions