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: <CA+SN3spFyFx-RiRPs0apTojKpC7A0geAs_JyqEWHC4z8UVrT+A@mail.gmail.com>
Date: Mon, 12 Aug 2024 19:32:40 +0300
From: Elad Yifee <eladwf@...il.com>
To: Felix Fietkau <nbd@....name>
Cc: daniel@...rotopia.org, Sean Wang <sean.wang@...iatek.com>, 
	Mark Lee <Mark-MC.Lee@...iatek.com>, Lorenzo Bianconi <lorenzo@...nel.org>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Matthias Brugger <matthias.bgg@...il.com>, 
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Chen Lin <chen45464546@....com>, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net v2] net: ethernet: mtk_eth_soc: fix memory leak in LRO
 rings release

On Mon, Aug 12, 2024 at 6:34 PM Felix Fietkau <nbd@....name> wrote:
>
> On 12.08.24 17:21, Elad Yifee wrote:
> > For LRO we allocate more than one page, yet 'skb_free_frag' is used
> > to free the buffer, which only frees a single page.
> > Fix it by using 'free_pages' instead.
> >
> > Fixes: 2f2c0d2919a1 ("net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag")
> > Signed-off-by: Elad Yifee <eladwf@...il.com>
>
> Are you sure about this change? From what I can see, the LRO buffer is
> (or at least should be) allocated as a compound page. Because of that,
> skb_free_frag should work on it. If it doesn't, wouldn't we run into the
> same issue when the network stack frees received packets?
>
> - Felix
>
Hey Felix,
I encountered this problem while testing the HWLRO operation on NETSYS3,
but it was part of a series of changes, so you’re right, with GFP_COMP
it shouldn’t be a problem. I automatically assumed it was a necessary
fix.
Sorry for the mess, I'll continue testing HWLRO and resubmit this
patch if I still find it necessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ