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: <87ttidmvr4.fsf@mailhost.krisman.be>
Date: Fri, 31 May 2024 19:01:19 -0400
From: Gabriel Krisman Bertazi <krisman@...e.de>
To: Jens Axboe <axboe@...nel.dk>
Cc: io-uring@...r.kernel.org,  netdev@...r.kernel.org
Subject: Re: [PATCH 1/5] io_uring: Fix leak of async data when connect prep
 fails

Jens Axboe <axboe@...nel.dk> writes:

> On 5/31/24 3:12 PM, Gabriel Krisman Bertazi wrote:
>> move_addr_to_kernel can fail, like if the user provides a bad sockaddr
>> pointer. In this case where the failure happens on ->prep() we don't
>> have a chance to clean the request later, so handle it here.
>
> Hmm, that should still get freed in the cleanup path? It'll eventually
> go on the compl_reqs list, and it has REQ_F_ASYNC_DATA set. Yes it'll
> be slower than the recycling it, but that should not matter as it's
> an erred request.

Hm right.  I actually managed to reproduce some kind of memory
exhaustion yesterday that I thought was fixed by this patch.  But I see
your point and I'm failing to trigger it today.

Please disregard this patch. I'll look further to figure out what I did
there.


-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ