All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: 许嘉诚 <stitch-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org>
Cc: security-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-distros-DYwG1KUNWo0m4/wLoHy/Wg@public.gmane.org,
	konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
	syzkaller-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [vs] KASAN: use-after-free in nilfs_mdt_destroy
Date: Mon, 15 Aug 2022 13:36:47 +0200	[thread overview]
Message-ID: <Yvovz7FKlHLNpNaf@kroah.com> (raw)
In-Reply-To: <34e8df4a.848e1.182a1264256.Coremail.stitch-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org>

On Mon, Aug 15, 2022 at 06:56:55PM +0800, 许嘉诚 wrote:
> Hi developers,
> 
> We may found a flaw in the fs module which can lead to UAF write or DoS.
> We would appreciate a CVE ID if this is a security issue.

As our documentation states, us at security-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org do not assign
CVEs or deal with them at all.

> 
> HEAD commit: 3d7cb6b04c3f Linux-5.19
> git tree: upstream 
> console output:https://drive.google.com/file/d/1PoH9PUdMilsrKtq1oGHu_shM3dggNFAB/view?usp=sharing
> kernel config: https://drive.google.com/file/d/1wgIUDwP5ho29AM-K7HhysSTfWFpfXYkG/view?usp=sharing
> syz repro: https://drive.google.com/file/d/19N1Xh8TVoSUr_2J8j-bWXktL21SvRx_9/view?usp=sharing
> C reproducer: https://drive.google.com/file/d/1R1rYseY7JBDCSfLAP4pjSCoMVgkr7l5b/view?usp=sharing
> 
> Description
> In alloc_inode, inode_init_always could return -NOMEM if
> security_inode_alloc fails. In its error handling, i_callback and
> nilfs_free_inode will be called. However, because inode->i_private is
> not initialized due to the failure of security_inode_alloc, the function
> nilfs_is_metadata_file_inode can return true and nilfs_mdt_destroy will
> 
> 
> be executed to lead to GPF bug.
> 
> 
> 
> 
> Someone found the similar problem: https://groups.google.com/g/syzkaller-bugs/c/z2WroC3_BSw.

Great, can you work on this in public on that thread then?  Have you
tested the proposed patch that is provided there to see if it solves it
or not?

> Fix this bug by moving the assignment of inode->i_private before security_inode_alloc.

That's what the existing patch looks to do, does that work?

And again, as this is public, why notify us and not just work to solve
this in public with the developers involved?

thanks,

greg k-h

       reply	other threads:[~2022-08-15 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <34e8df4a.848e1.182a1264256.Coremail.stitch@zju.edu.cn>
     [not found] ` <34e8df4a.848e1.182a1264256.Coremail.stitch-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org>
2022-08-15 11:36   ` Greg KH [this message]
     [not found]     ` <Yvovz7FKlHLNpNaf-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2022-08-15 13:54       ` [vs] KASAN: use-after-free in nilfs_mdt_destroy Ryusuke Konishi
2022-08-16  8:35       ` Lukas Bulwahn
2022-08-15 15:09   ` [vs-plain] " John Haxby
     [not found]     ` <8C0C088A-11A4-4D0E-93B9-CA70F0040341-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2022-08-16  7:46       ` butt3rflyh4ck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yvovz7FKlHLNpNaf@kroah.com \
    --to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
    --cc=konishi.ryusuke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-distros-DYwG1KUNWo0m4/wLoHy/Wg@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=security-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=stitch-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org \
    --cc=syzkaller-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.