Commit ad93bab6 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge tag 'ieee802154-for-net-2023-03-02' of...

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/20230302153032.1312755-1-stefan@datenfreihafen.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 9781e98a 02f18662
...@@ -1913,6 +1913,8 @@ static int ca8210_skb_tx( ...@@ -1913,6 +1913,8 @@ static int ca8210_skb_tx(
* packet * packet
*/ */
mac_len = ieee802154_hdr_peek_addrs(skb, &header); mac_len = ieee802154_hdr_peek_addrs(skb, &header);
if (mac_len < 0)
return mac_len;
secspec.security_level = header.sec.level; secspec.security_level = header.sec.level;
secspec.key_id_mode = header.sec.key_id_mode; secspec.key_id_mode = header.sec.key_id_mode;
......
...@@ -1412,7 +1412,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -1412,7 +1412,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
if (!nla_get_u8(info->attrs[NL802154_ATTR_SCAN_TYPE])) { if (!info->attrs[NL802154_ATTR_SCAN_TYPE]) {
NL_SET_ERR_MSG(info->extack, "Malformed request, missing scan type"); NL_SET_ERR_MSG(info->extack, "Malformed request, missing scan type");
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment