linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: syzbot
	<bot+f7b85b77fd8042059586165494cd708475e87fc3@syzkaller.appspotmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk,
	tglx@linutronix.de
Subject: Re: general protection fault in string
Date: Mon, 11 Dec 2017 15:11:28 -0800	[thread overview]
Message-ID: <20171211231128.GB48753@gmail.com> (raw)
In-Reply-To: <20171211230305.GA48753@gmail.com>

On Mon, Dec 11, 2017 at 03:03:05PM -0800, Eric Biggers wrote:
> 
> The bug is that sys_timer_create() allows setting ->it_sigev_notify to almost
> any value, but show_timer() assumes that it has one of a specific set of values.
> Here's a simplified reproducer:
> 
> 	#include <fcntl.h>
> 	#include <signal.h>
> 	#include <time.h>
> 	#include <unistd.h>
> 
> 	int main()
> 	{
> 		struct sigevent e = {
> 			.sigev_signo = 0x1c,
> 			.sigev_notify = 0x100000,
> 		};
> 		timer_t t;
> 		int fd;
> 		char buf[64];
> 
> 		timer_create(CLOCK_MONOTONIC, &e, &t);
> 
> 		fd = open("/proc/self/timers", O_RDONLY);
> 
> 		read(fd, buf, sizeof(buf));
> 	}
> 
> I wonder if anything would break if we made sys_timer_create() return -EINVAL
> for unrecognized values of sigev_notify?  That's what it *should* do, but it
> seems to be the classic "unchecked flags" bug, yet again...
> 

Ah, I see that this was previously reported and a fix was already sent out
(https://marc.info/?l=linux-kernel&m=151204669103208&w=2).  Let's mark this
report as a duplicate:

#syz dup: general protection fault in show_timer

  reply	other threads:[~2017-12-11 23:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001a1143e6ccdb8581055f499952@google.com>
2017-12-03  5:10 ` general protection fault in string syzbot
2017-12-11 23:03   ` Eric Biggers
2017-12-11 23:11     ` Eric Biggers [this message]
2017-12-12 17:11     ` Thomas Gleixner
2017-12-12 17:58       ` Eric Biggers

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=20171211231128.GB48753@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=bot+f7b85b77fd8042059586165494cd708475e87fc3@syzkaller.appspotmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --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).