Skip to content

Commit ad93bab

Browse files
committed
Merge tag 'ieee802154-for-net-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan
Stefan Schmidt says: ==================== ieee802154 for net 2023-03-02 Two small fixes this time. Alexander Aring fixed a potential negative array access in the ca8210 driver. Miquel Raynal fixed a crash that could have been triggered through the extended netlink API for 802154. This only came in this merge window. Found by syzkaller. * tag 'ieee802154-for-net-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan: ieee802154: Prevent user from crashing the host ca8210: fix mac_len negative array access ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 9781e98 + 02f1866 commit ad93bab

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/net/ieee802154/ca8210.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,6 +1913,8 @@ static int ca8210_skb_tx(
19131913
* packet
19141914
*/
19151915
mac_len = ieee802154_hdr_peek_addrs(skb, &header);
1916+
if (mac_len < 0)
1917+
return mac_len;
19161918

19171919
secspec.security_level = header.sec.level;
19181920
secspec.key_id_mode = header.sec.key_id_mode;

net/ieee802154/nl802154.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
14121412
return -EOPNOTSUPP;
14131413
}
14141414

1415-
if (!nla_get_u8(info->attrs[NL802154_ATTR_SCAN_TYPE])) {
1415+
if (!info->attrs[NL802154_ATTR_SCAN_TYPE]) {
14161416
NL_SET_ERR_MSG(info->extack, "Malformed request, missing scan type");
14171417
return -EINVAL;
14181418
}

0 commit comments

Comments
 (0)