linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Jan Kara <jack@suse.cz>
Cc: Jeff Mahoney <jeffm@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	reiserfs-devel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jan Kara <jack@suse.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	syzkaller-bugs@googlegroups.com,
	syzbot+6bd77b88c1977c03f584@syzkaller.appspotmail.com
Subject: Re: [PATCH?] reiserfs: prevent panic: don't allow %-char in journal dev. name
Date: Mon, 9 Apr 2018 16:30:49 +0200	[thread overview]
Message-ID: <CACT4Y+Z62KDR+zo4V3hEYmmoET1=iBZOuMXFGa=zXb_BdJ3MAQ@mail.gmail.com> (raw)
In-Reply-To: <20180409142517.qrorcyng6puk4qed@quack2.suse.cz>

On Mon, Apr 9, 2018 at 4:25 PM, Jan Kara <jack@suse.cz> wrote:
> On Wed 04-04-18 21:48:53, Jeff Mahoney wrote:
>> On 4/4/18 9:45 PM, Andrew Morton wrote:
>> > On Wed, 4 Apr 2018 18:25:16 -0700 Randy Dunlap <rdunlap@infradead.org> wrote:
>> >
>> >> From: Randy Dunlap <rdunlap@infradead.org>
>> >>
>> >> If the reiserfs mount option's journal name contains a '%' character,
>> >> it can lead to a WARN_ONCE() in lib/vsprintf.c::format_decode(),
>> >> saying: "Please remove unsupported %/ in format string."
>> >> That's OK until panic_on_warn is set, at which point it's dead, Jim.
>> >>
>> >> To placate this situation, check the journal name string for a '%'
>> >> character and return an error if one is found. Also print a warning
>> >> (one that won't panic the kernel) about the invalid journal name (e.g.):
>> >>
>> >>   reiserfs: journal device name is invalid: %/file0
>> >>
>> >> (In this example, the caller app specified the journal device name as
>> >> "%/file0".)
>> >>
>> >
>> > Well, that is a valid filename and we should support it...
>> >
>> > Isn't the bug in journal_init_dev()?
>>
>> Yep.  That's exactly it.
>>
>> Acked-by: Jeff Mahoney <jeffm@suse.com>
>
> Thanks. I've picked up the patch from Andrew, added his Signed-off-by (OK,
> Andrew?), wrote a proper changelog and pushed it to my tree. The result is
> attached.

Hi Jan,

Please also add:

Reported-by: syzbot+6bd77b88c1977c03f584@syzkaller.appspotmail.com

as the original reporter.

  reply	other threads:[~2018-04-09 14:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05  1:25 [PATCH?] reiserfs: prevent panic: don't allow %-char in journal dev. name Randy Dunlap
2018-04-05  1:45 ` Andrew Morton
2018-04-05  1:48   ` Jeff Mahoney
2018-04-05  2:05     ` Randy Dunlap
2018-04-09 14:25     ` Jan Kara
2018-04-09 14:30       ` Dmitry Vyukov [this message]
2018-04-09 14:34       ` Jan Kara
2018-04-05  9:04   ` Rasmus Villemoes
2018-04-06 13:45     ` Rasmus Villemoes
2018-04-06 16:55     ` Jeff Mahoney

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='CACT4Y+Z62KDR+zo4V3hEYmmoET1=iBZOuMXFGa=zXb_BdJ3MAQ@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=dedekind1@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=jeffm@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=syzbot+6bd77b88c1977c03f584@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;
as well as URLs for NNTP newsgroup(s).