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 14:42:51 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Horatiu Vultur <horatiu.vultur@...rochip.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

On Mon, May 6, 2024 at 2:35 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Mon, May 6, 2024 at 2:04 PM Horatiu Vultur
> <horatiu.vultur@...rochip.com> wrote:
> >
> > 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

Remaining buggy drivers would be these USB drivers:

drivers/net/usb/aqc111.c:1154:          new_skb->truesize =
SKB_TRUESIZE(new_skb->len);
drivers/net/usb/smsc75xx.c:2237:
skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/smsc75xx.c:2256:
ax_skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/smsc95xx.c:1873:
skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/smsc95xx.c:1891:
ax_skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/sr9700.c:424:                   skb->truesize = len +
sizeof(struct sk_buff);
drivers/net/usb/sr9700.c:436:           sr_skb->truesize = len +
sizeof(struct sk_buff);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ