linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: syzbot <syzbot+6ec38f7a8db3b3fb1002@syzkaller.appspotmail.com>,
	anton@tuxera.com,  brauner@kernel.org,  keescook@chromium.org,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,  linux-ntfs-dev@lists.sourceforge.net,
	syzkaller-bugs@googlegroups.com,  viro@zeniv.linux.org.uk
Subject: Re: [syzbot] [ntfs?] WARNING in do_open_execat
Date: Fri, 18 Aug 2023 15:59:39 -0500	[thread overview]
Message-ID: <87a5uo6p8k.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <20230818173625.by6bud4u7uz2k4be@f> (Mateusz Guzik's message of "Fri, 18 Aug 2023 19:36:25 +0200")

Mateusz Guzik <mjguzik@gmail.com> writes:

> On Fri, Aug 18, 2023 at 11:26:51AM -0500, Eric W. Biederman wrote:
>> syzbot <syzbot+6ec38f7a8db3b3fb1002@syzkaller.appspotmail.com> writes:
>> 
>> > Hello,
>> >
>> > syzbot found the following issue on:
>> 
>> Not an issue.
>> Nothing to do with ntfs.
>> 
>> The code is working as designed and intended.
>> 
>> syzbot generated a malformed exec and the kernel made it
>> well formed and warned about it.
>> 
>
> There is definitely an issue here.
>
> The warn on comes from:
>         /*
>          * may_open() has already checked for this, so it should be
>          * impossible to trip now. But we need to be extra cautious
>          * and check again at the very end too.
>          */
>         err = -EACCES;
>         if (WARN_ON_ONCE(!S_ISREG(file_inode(file)->i_mode) ||
>                          path_noexec(&file->f_path)))
>                 goto exit;
>
> Where path_noexec is:
>         return (path->mnt->mnt_flags & MNT_NOEXEC) ||
>                (path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);

My confusion.

I was seeing the message from
	if (retval == 0)
		pr_warn_once("process '%s' launched '%s' with NULL argv: empty string added\n",
			     current->comm, bprm->filename);

I made the mistake of assuming that that was generating the backtrace.
The lack of args to execveat appears to be working fine.

I see you tracked this down to a non-exhaustive check in may_open.
Apologies for the noise.

Eric


  parent reply	other threads:[~2023-08-18 21:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000000000000c74d44060334d476@google.com>
     [not found] ` <87o7j471v8.fsf@email.froward.int.ebiederm.org>
2023-08-18 17:33   ` Kees Cook
2023-08-18 17:43     ` Matthew Wilcox
2023-08-18 17:56       ` Kees Cook
2023-08-18 19:12     ` Mateusz Guzik
2023-08-19 11:34       ` Christian Brauner
2023-08-19 20:03         ` Mateusz Guzik
2023-08-19 19:16       ` Theodore Ts'o
     [not found]   ` <20230818173625.by6bud4u7uz2k4be@f>
2023-08-18 20:59     ` Eric W. Biederman [this message]
     [not found] ` <000000000000f67b790613665d7a@google.com>
2024-03-11 18:48   ` [syzbot] [ntfs3?] " Jan Kara
2024-03-11 19:01     ` Mateusz Guzik
2024-03-12 12:06       ` Jan Kara
2024-03-12 12:44         ` Mateusz Guzik

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=87a5uo6p8k.fsf@email.froward.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=anton@tuxera.com \
    --cc=brauner@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=mjguzik@gmail.com \
    --cc=syzbot+6ec38f7a8db3b3fb1002@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox