]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: fix NULL dereference in macsec_upd_offload()
authorDavide Caratti <dcaratti@redhat.com>
Mon, 6 Apr 2020 09:38:29 +0000 (11:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Apr 2020 17:26:08 +0000 (10:26 -0700)
commit460ba11789870ed3591c263840c3fbe19dc570c8
tree341d8daa358d59acd7a6ee86becaba31c519ef14
parentd062473f1e8a3ffd11d054e4ca30cd9a6facdcca
macsec: fix NULL dereference in macsec_upd_offload()

macsec_upd_offload() gets the value of MACSEC_OFFLOAD_ATTR_TYPE
without checking its presence in the request message, and this causes
a NULL dereference. Fix it rejecting any configuration that does not
include this attribute.

Reported-and-tested-by: syzbot+7022ab7c383875c17eff@syzkaller.appspotmail.com
Fixes: 846a87f53410 ("net: macsec: add nla support for changing the offloading selection")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c