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]
Message-ID: <0a95501d45fd23baa7ce5bab88c033380e2d095b.camel@sipsolutions.net>
Date:   Fri, 12 Feb 2021 11:18:08 +0100
From:   Johannes Berg <johannes@...solutions.net>
To:     Colin Ian King <colin.king@...onical.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: Potential invalid ~ operator in net/mac80211/cfg.c

On Fri, 2021-02-05 at 18:20 +0000, Colin Ian King wrote:
> 
> > > https://lore.kernel.org/linux-wireless/516C0C7F.3000204@openwrt.org/
> > > 
> > > But maybe that isn't actually quite right due to integer promotion?
> > > OTOH, that's a u8, so it should do the ~ in u8 space, and then compare
> > > to 0 also?
> > 
> > rc_rateidx_vht_mcs_mask is a u64, so I think the expression could be
> > expressed as:
> 
> oops, fat fingered that, it is a u16 not a u64

Right, u16, I must've looked at some ancient version or something.

But no, I was obviously wrong with what I said above.

So of course the condition is always true, like you said.

However, what was intended doesn't look like !, but rather == 0xff and
== 0xffff respectively, I'll send a patch.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ