lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 13 Jul 2021 09:32:38 -0400
From:   Alexander Aring <alex.aring@...il.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     Stefan Schmidt <stefan@...enfreihafen.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Marcel Holtmann <marcel@...tmann.org>,
        linux-wpan - ML <linux-wpan@...r.kernel.org>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nl802154: Fix type check in nl802154_new_interface()

Hi,

On Mon, 12 Jul 2021 at 09:49, YueHaibing <yuehaibing@...wei.com> wrote:
>
> We got this UBSAN warning:
>
> UBSAN: shift-out-of-bounds in net/ieee802154/nl802154.c:920:44
> shift exponent -1 is negative
> CPU: 3 PID: 8258 Comm: repro Not tainted 5.13.0+ #222
> Call Trace:
>  dump_stack_lvl+0x8d/0xcf
>  ubsan_epilogue+0xa/0x4e
>  __ubsan_handle_shift_out_of_bounds+0x161/0x182
>  nl802154_new_interface+0x3bf/0x3d0
>  genl_family_rcv_msg_doit.isra.15+0x12d/0x170
>  genl_rcv_msg+0x11a/0x240
>  netlink_rcv_skb+0x69/0x160
>  genl_rcv+0x24/0x40
>
> NL802154_IFTYPE_UNSPEC is -1, so enum nl802154_iftype type now
> is a signed integer, which is assigned by nla_get_u32 in
> nl802154_new_interface(), this may cause type is negative and trigger
> this warning.

I think this is not the right fix, the fix is to change the UAPI that
NL802154_IFTYPE_UNSPEC fits into the netlink range of U32. I will
prepare a fix for that, it should still be backwards compatible.

- Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ