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]
Date: Mon, 4 Mar 2024 13:02:20 -0500
From: Benjamin LaHaise <ben@...munityfibre.ca>
To: Bart Van Assche <bvanassche@....org>
Cc: Edward Adam Davis <eadavis@...com>,
	syzbot+b91eb2ed18f599dd3c31@...kaller.appspotmail.com,
	brauner@...nel.org, jack@...e.cz, linux-aio@...ck.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com, viro@...iv.linux.org.uk
Subject: Re: [PATCH] fs/aio: fix uaf in sys_io_cancel

On Mon, Mar 04, 2024 at 09:58:37AM -0800, Bart Van Assche wrote:
> On 3/4/24 09:47, Benjamin LaHaise wrote:
> >On Mon, Mar 04, 2024 at 09:40:35AM -0800, Bart Van Assche wrote:
> >>On 3/4/24 09:31, Benjamin LaHaise wrote:
> >>>A revert is justified when a series of patches is buggy and had
> >>>insufficient review prior to merging.
> >>
> >>That's not how Linux kernel development works. If a bug can get fixed
> >>easily, a fix is preferred instead of reverting + reapplying a patch.
> >
> >Your original "fix" is not right, and it wasn't properly tested.  Commit
> >54cbc058d86beca3515c994039b5c0f0a34f53dd needs to be reverted.
> 
> As I explained before, the above reply is not sufficiently detailed to
> motivate a revert.

You have introduced a use-after-free.  You have not corrected the
underlying cause of that use-after-free.

Once you call ->ki_cancel(), you can't touch the kiocb.  The call into 
->ki_cancel() can result in a subsequent aio_complete() happening on that
kiocb.  Your change is wrong, your "fix" is wrong, and you are refusing to
understand *why* your change was wrong in the first place.

You haven't even given me a test case justifying your change.  You need to
justify your change to the maintainer, not the other way around.

Revert 54cbc058d86beca3515c994039b5c0f0a34f53dd and the problem goes away.

		-ben

> Bart.
> 

-- 
"Thought is the essence of where you are now."

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ