From: Mikulas Patocka <mpatocka@redhat.com>
To: syzbot
<bot+d681aa1d5b9189045b7015bd620e77f8406b76d2@syzkaller.appspotmail.com>
Cc: dan.j.williams@intel.com, darrick.wong@oracle.com, jack@suse.cz,
linux-kernel@vger.kernel.org, snitzer@redhat.com,
syzkaller-bugs@googlegroups.com, toshi.kani@hpe.com,
vgoyal@redhat.com
Subject: [PATCH] dax: general protection fault in dax_alloc_inode
Date: Tue, 14 Nov 2017 09:59:54 -0500 (EST) [thread overview]
Message-ID: <alpine.LRH.2.02.1711140958210.8744@file01.intranet.prod.int.rdu2.redhat.com> (raw)
In-Reply-To: <94eb2c0d010af126b3055df0c47b@google.com>
On Tue, 14 Nov 2017, syzbot wrote:
> Hello,
>
> syzkaller hit the following crash on e4880bc5dfb1f02b152e62a894b5c6f3e995b3cf
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
>
> Unfortunately, I don't have any reproducer for this bug yet.
>
>
> RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user memory access
> general protection fault: 0000 [#1] SMP KASAN
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Modules linked in:
> CPU: 1 PID: 31095 Comm: syz-executor3 Not tainted 4.14.0-rc8+ #75
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google
> 01/01/2011
> task: ffff8801cae96000 task.stack: ffff8801d2438000
> RIP: 0010:dax_alloc_inode+0x3b/0x70 drivers/dax/super.c:348
> RSP: 0018:ffff8801d243f8d0 EFLAGS: 00010203
> RAX: 0000000000000010 RBX: 0000000000000000 RCX: 000000000000000b
> RDX: dffffc0000000000 RSI: ffffffff85b34340 RDI: 000000000000005c
> RBP: ffff8801d243f8e0 R08: 0000000000000001 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff83595ba0
> R13: dffffc0000000000 R14: ffff8801cedbc5c0 R15: 0000000064646178
> FS: 0000000000000000(0000) GS:ffff8801db300000(0063) knlGS:00000000f7742b40
> CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
> CR2: 00000000f778cdb0 CR3: 00000001c5739000 CR4: 00000000001406e0
> DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
> Call Trace:
> alloc_inode+0x65/0x180 fs/inode.c:208
> new_inode_pseudo+0x69/0x190 fs/inode.c:890
> new_inode+0x1c/0x40 fs/inode.c:919
> mount_pseudo_xattr+0x288/0x560 fs/libfs.c:261
> mount_pseudo include/linux/fs.h:2137 [inline]
> dax_mount+0x2e/0x40 drivers/dax/super.c:388
> mount_fs+0x66/0x2d0 fs/super.c:1223
> vfs_kern_mount.part.26+0xc6/0x4a0 fs/namespace.c:1037
> vfs_kern_mount fs/namespace.c:2509 [inline]
> do_new_mount fs/namespace.c:2512 [inline]
> do_mount+0xea1/0x2bb0 fs/namespace.c:2841
> C_SYSC_mount fs/compat.c:195 [inline]
> compat_SyS_mount+0xd0/0x1070 fs/compat.c:160
> do_syscall_32_irqs_on arch/x86/entry/common.c:329 [inline]
> do_fast_syscall_32+0x3f2/0xf05 arch/x86/entry/common.c:391
> entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:125
> RIP: 0023:0xf7f46c79
> RSP: 002b:00000000f774201c EFLAGS: 00000296 ORIG_RAX: 0000000000000015
> RAX: ffffffffffffffda RBX: 0000000020907ff8 RCX: 0000000020058ffd
> RDX: 0000000020c77ffa RSI: 0000000000000000 RDI: 0000000020de9000
> RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> Code: 3d eb ad c1 02 be c0 00 40 01 e8 21 d2 48 fe 48 89 c3 48 ba 00 00 00 00
> 00 fc ff df 48 83 c0 10 48 8d 7b 5c 48 89 f9 48 c1 e9 03 <0f> b6 0c 11 48 89
> fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 75 0e
> RIP: dax_alloc_inode+0x3b/0x70 drivers/dax/super.c:348 RSP: ffff8801d243f8d0
> ---[ end trace 543b2dab980d72b6 ]---
>
>
> ---
> This bug is generated by a dumb bot. It may contain errors.
> See https://goo.gl/tpsmEJ for details.
> Direct all questions to syzkaller@googlegroups.com.
> Please credit me with: Reported-by: syzbot <syzkaller@googlegroups.com>
>
> syzbot will keep track of this bug report.
> Once a fix for this bug is committed, please reply to this email with:
> #syz fix: exact-commit-title
> To mark this as a duplicate of another syzbot report, please reply with:
> #syz dup: exact-subject-of-another-report
> If it's a one-off invalid bug report, please reply with:
> #syz invalid
> Note: if the crash happens again, it will cause creation of a new bug report.
> Note: all commands must start from beginning of the line in the email body.
Don't crash in case of allocation failure in dax_alloc_inode.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org # v4.12+
---
drivers/dax/super.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6/drivers/dax/super.c
===================================================================
--- linux-2.6.orig/drivers/dax/super.c
+++ linux-2.6/drivers/dax/super.c
@@ -344,6 +344,9 @@ static struct inode *dax_alloc_inode(str
struct inode *inode;
dax_dev = kmem_cache_alloc(dax_cache, GFP_KERNEL);
+ if (!dax_dev)
+ return NULL;
+
inode = &dax_dev->inode;
inode->i_rdev = 0;
return inode;
next parent reply other threads:[~2017-11-14 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94eb2c0d010af126b3055df0c47b@google.com>
2017-11-14 14:59 ` Mikulas Patocka [this message]
2017-11-14 16:54 ` Dan Williams
2017-12-03 20:38 ` 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=alpine.LRH.2.02.1711140958210.8744@file01.intranet.prod.int.rdu2.redhat.com \
--to=mpatocka@redhat.com \
--cc=bot+d681aa1d5b9189045b7015bd620e77f8406b76d2@syzkaller.appspotmail.com \
--cc=dan.j.williams@intel.com \
--cc=darrick.wong@oracle.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=toshi.kani@hpe.com \
--cc=vgoyal@redhat.com \
/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
all inboxes | Powered by JetHome®