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: <20240305191829.083ba9d8@kernel.org>
Date: Tue, 5 Mar 2024 19:18:29 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Juntong Deng <juntong.deng@...look.com>
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
 pabeni@...hat.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: ipv4, ipv6: Fix incorrect skb->data_len
 caused by __ip_append_data

On Tue,  5 Mar 2024 22:42:05 +0000 Juntong Deng wrote:
> When __ip_append_data allocate the first skb in the queue, or when the
> size of the data in the skb exceed the MTU and require a new fragment
> and allocate a new skb, both cause the size of the data increased by
> this __ip_append_data to not be added to skb->data_len.
> 
> This is because in the current __ip_append_data, skb_put is used when
> putting in the data for the new skb, but skb_put only increase skb->len,
> but not skb->data_len, resulting in skb->data_len missing this part of
> the data size.
> 
> All skb processed by __ip_append_data are unable to obtain the accurate
> data size based on skb->data_len for the above reason.
> 
> Also __ip6_append_data has the same problem.
> 
> This patch fixes the bug.

data_len is the amount of data in the non-linear parts of the skb.
Please run some tests before submitting patches.
-- 
pw-bot: cr
pv-bot: s

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ