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]
Message-ID: <ae4e55df-6fe6-4cab-ac44-3ed10a63bfbe@grimberg.me>
Date: Mon, 8 Jul 2024 09:21:27 +0300
From: Sagi Grimberg <sagi@...mberg.me>
To: Hugh Dickins <hughd@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: fix rc7's __skb_datagram_iter()



On 08/07/2024 6:00, Hugh Dickins wrote:
> X would not start in my old 32-bit partition (and the "n"-handling looks
> just as wrong on 64-bit, but for whatever reason did not show up there):
> "n" must be accumulated over all pages before it's added to "offset" and
> compared with "copy", immediately after the skb_frag_foreach_page() loop.

That is indeed strange. I see the issue. It didn't happen in my local 
testing either.

>
> Fixes: d2d30a376d9c ("net: allow skb_datagram_iter to be called from any context")
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
> ---
>   net/core/datagram.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/datagram.c b/net/core/datagram.c
> index e9ba4c7b449d..ea69d01156e6 100644
> --- a/net/core/datagram.c
> +++ b/net/core/datagram.c
> @@ -420,6 +420,7 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
>   			struct page *p;
>   			u8 *vaddr;
>   
> +			n = 0;

I think its better to reset n right before the skb_frag_foreach_page() 
iteration.

Thanks Hugh for addressing this!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ