]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ieee802154: Prevent user from crashing the host
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 1 Mar 2023 15:44:50 +0000 (16:44 +0100)
committerStefan Schmidt <stefan@datenfreihafen.org>
Thu, 2 Mar 2023 13:39:48 +0000 (14:39 +0100)
commit02f18662f6c671382345fcb696e808d78f4c194a
tree3758ec8613ed2cbed5788b9a2fde6455470d23fb
parent6c993779ea1d0cccdb3a5d7d45446dd229e610a3
ieee802154: Prevent user from crashing the host

Avoid crashing the machine by checking
info->attrs[NL802154_ATTR_SCAN_TYPE] presence before de-referencing it,
which was the primary intend of the blamed patch.

Reported-by: Sanan Hasanov <sanan.hasanov@Knights.ucf.edu>
Suggested-by: Eric Dumazet <edumazet@google.com>
Fixes: a0b6106672b5 ("ieee802154: Convert scan error messages to extack")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230301154450.547716-1-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/ieee802154/nl802154.c