Re: [PATCH] net: fix shift-out-of-bounds in nl802154_new_interface

2021-04-06 Thread Pavel Skripkin
On Tue, 2021-04-06 at 08:21 -0400, Alexander Aring wrote: > Hi, > > On Mon, 5 Apr 2021 at 15:58, Pavel Skripkin > wrote: > > > > syzbot reported shift-out-of-bounds in nl802154_new_interface. > > The problem was in signed representation of enum nl802154_iftype > > > > enum nl802154_iftype { > >

Re: [PATCH] net: fix shift-out-of-bounds in nl802154_new_interface

2021-04-06 Thread Alexander Aring
Hi, On Mon, 5 Apr 2021 at 15:58, Pavel Skripkin wrote: > > syzbot reported shift-out-of-bounds in nl802154_new_interface. > The problem was in signed representation of enum nl802154_iftype > > enum nl802154_iftype { > /* for backwards compatibility TODO */ > NL802154_IFTYPE_UNSPEC

[PATCH] net: fix shift-out-of-bounds in nl802154_new_interface

2021-04-05 Thread Pavel Skripkin
syzbot reported shift-out-of-bounds in nl802154_new_interface. The problem was in signed representation of enum nl802154_iftype enum nl802154_iftype { /* for backwards compatibility TODO */ NL802154_IFTYPE_UNSPEC = -1, ... Since, enum has negative value in it, objects of this type