Re: [syzbot] [syzbot] [wpan?] KMSAN: uninit-value in ieee802154_hdr_push (2)
From: syzbot
Date: Tue Feb 13 2024 - 09:17:21 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: [syzbot] [wpan?] KMSAN: uninit-value in ieee802154_hdr_push (2)
Author: n.zhandarovich@xxxxxxxxxx
If cb->secen_override == 0 but cb->secen == 1
mac802154_set_header_security() will not finish with error yet some
values in sec header will remain uninited. Fix the issue by only
checking cb->secen.
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
---
net/mac802154/iface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index c0e2da5072be..ad799d349625 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -328,7 +328,7 @@ static int mac802154_set_header_security(struct ieee802154_sub_if_data *sdata,
mac802154_llsec_get_params(&sdata->sec, ¶ms);
- if (!params.enabled && cb->secen_override && cb->secen)
+ if (!params.enabled && cb->secen)
return -EINVAL;
if (!params.enabled ||
(cb->secen_override && !cb->secen) ||