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  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:   Sun, 16 Feb 2020 19:29:28 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     mkubecek@...e.cz
Cc:     kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] ethtool: fix application of verbose no_mask bitset

From: Michal Kubecek <mkubecek@...e.cz>
Date: Sat, 15 Feb 2020 01:55:53 +0100 (CET)

> A bitset without mask in a _SET request means we want exactly the bits in
> the bitset to be set. This works correctly for compact format but when
> verbose format is parsed, ethnl_update_bitset32_verbose() only sets the
> bits present in the request bitset but does not clear the rest. This can
> cause incorrect results like
> 
>   lion:~ # ethtool eth0 | grep Wake
>           Supports Wake-on: pumbg
>           Wake-on: g
>   lion:~ # ethtool -s eth0 wol u
>   lion:~ # ethtool eth0 | grep Wake
>           Supports Wake-on: pumbg
>           Wake-on: ug
> 
> when the second ethtool command issues request
> 
> ETHTOOL_MSG_WOL_SET
>     ETHTOOL_A_WOL_HEADER
>         ETHTOOL_A_HEADER_DEV_NAME = "eth0"
>     ETHTOOL_A_WOL_MODES
>         ETHTOOL_A_BITSET_NOMASK
>         ETHTOOL_A_BITSET_BITS
>             ETHTOOL_A_BITSET_BITS_BIT
>                 ETHTOOL_BITSET_BIT_INDEX = 1
> 
> Fix the logic by clearing the whole target bitmap before we start iterating
> through the request bits.
> 
> Fixes: 10b518d4e6dd ("ethtool: netlink bitset handling")
> Signed-off-by: Michal Kubecek <mkubecek@...e.cz>

Applied, thanks Michal.

Powered by blists - more mailing lists