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: <8f8d07c1-9276-df86-f1dc-3d272d4ab91d@kernel.dk>
Date:   Fri, 29 Apr 2022 06:47:55 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Noah Goldstein <goldstein.w.n@...il.com>
Cc:     asml.silence@...il.com, io-uring@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] io_uring: Fix memory leak if file setup fails.

On 4/28/22 6:42 PM, Noah Goldstein wrote:
> If `get_unused_fd_flags` files fails (either in setting up `ctx` as
> `tctx->last` or `get_unused_fd_flags`) `ctx` will never be freed.

There's a comment there telling you why, the fput will end up
releasing it just like it would when an application closes it.

> I very well may be missing something (or there may be a double
> free if the failure is after `get_unused_fd_flags`) but looks
> to me to be a memory leak.

Have you tried synthetically reproducing the two failures you're
thinking of and tracing cleanup?

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ