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] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 May 2024 15:13:57 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Eric Dumazet <edumazet@...gle.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<soheil@...gle.com>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: tcp: Update the type of scaling_ratio

The 05/06/2024 14:35, Eric Dumazet wrote:
> 
> On Mon, May 6, 2024 at 2:04 PM Horatiu Vultur
> <horatiu.vultur@...rochip.com> wrote:

Hi Eric,

> >
> > It was noticed the following issue that sometimes the scaling_ratio was
> > getting a value of 0, meaning that window space was having a value of 0,
> > so then the tcp connection was stopping.
> > The reason why the scaling_ratio was getting a value of 0 is because
> > when it was calculated, it was truncated from a u64 to a u8. So for
> > example if it scaling_ratio was supposed to be 256 it was getting a
> > value of 0.
> > The fix consists in chaning the type of scaling_ratio from u8 to u16.
> >
> > Fixes: dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale")
> > Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> > ---
> 
> This is a wrong patch. We need to fix the root cause instead.
> 
> By definition, skb->len / skb->truesize must be < 1
> 
> If not, a driver is lying to us and this is quite bad.
> 
> Please take a look at the following patch for a real fix.
> 
> 4ce62d5b2f7aecd4900e7d6115588ad7f9acccca net: usb: ax88179_178a: stop
> lying about skb->truesize

Thanks for explanation and for the suggestion.
I have tried this on a driver that is not yet upstream.
Sorry for the noise.

-- 
/Horatiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ