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: <73f3d573-c093-469b-ac7e-36fdb7832933@redhat.com>
Date: Tue, 30 Dec 2025 11:57:37 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Andrew Lunn <andrew@...n.ch>, Yeounsu Moon <yyyynoom@...il.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: dlink: mask rx_coalesce/rx_timeout before
 writing RxDMAIntCtrl

On 12/23/25 10:43 AM, Andrew Lunn wrote:
> On Tue, Dec 23, 2025 at 09:10:06AM +0900, Yeounsu Moon wrote:
>> RxDMAIntCtrl encodes rx_coalesce in the low 16 bits
>> and rx_timeout in the high 16 bits. If either value exceeds
>> the field width, the current code may truncate the value and/or
>> corrupt adjacent bits when programming the register.
>>
>> Mask both values to 16 bits and cast to u32 before shifting
>> so only the intended fields are written.
> 
> It would be better to do range checks in rio_probe1() and call
> netdev_err() and return -EINVAL?
> 
> Anybody trying to use very large values then gets an error message
> rather than it working, but not as expected.

I'm not sure we can do such change: any eventual user with bad setting
will get a broken setup after kernel update. I think we should avoid
such regression, and use something similar to this patch.

@Yeounsu: the type cast in the current patch is not needed, please drop
it, thanks!

Paolo




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ