WARNING in __vm_enough_memory

15 views
Skip to first unread message

syzbot

unread,
Apr 23, 2019, 6:25:05 AM4/23/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 68d7a45e Linux 4.14.113
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=114db528a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbf1fde4d7489e1c
dashboard link: https://syzkaller.appspot.com/bug?extid=266a0c54afa72fa2f9ca
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11540238a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1652d477200000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+266a0c...@syzkaller.appspotmail.com

audit: type=1400 audit(1556013232.155:36): avc: denied { map } for
pid=7147 comm="syz-executor758" path="/root/syz-executor758322811"
dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
memory commitment underflow
audit: type=1400 audit(1556013232.155:37): avc: denied { map } for
pid=7154 comm="syz-executor758" path="/dev/ashmem" dev="devtmpfs" ino=15697
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1
------------[ cut here ]------------
WARNING: CPU: 0 PID: 7155 at mm/util.c:604
__vm_enough_memory.cold+0x18/0x58 mm/util.c:604
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 7155 Comm: syz-executor758 Not tainted 4.14.113 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
panic+0x1f2/0x438 kernel/panic.c:182
__warn.cold+0x2f/0x34 kernel/panic.c:546
report_bug+0x216/0x254 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:177 [inline]
fixup_bug arch/x86/kernel/traps.c:172 [inline]
do_error_trap+0x1bb/0x310 arch/x86/kernel/traps.c:295
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:944
RIP: 0010:__vm_enough_memory.cold+0x18/0x58 mm/util.c:604
RSP: 0018:ffff88809fe77ad8 EFLAGS: 00010286
RAX: 000000000000001b RBX: fff8000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff888082630e68 RDI: ffffed1013fcef51
RBP: ffff88809fe77b10 R08: 000000000000001b R09: ffff888082630e88
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
R13: ffff888087124640 R14: ffffffff878035e0 R15: fff800000000d3f2
security_vm_enough_memory_mm+0x99/0xc0 security/security.c:328
shmem_acct_size mm/shmem.c:149 [inline]
__shmem_file_setup.part.0+0x262/0x400 mm/shmem.c:4245
__shmem_file_setup mm/shmem.c:4242 [inline]
shmem_file_setup mm/shmem.c:4309 [inline]
shmem_file_setup+0x50/0x70 mm/shmem.c:4307
ashmem_mmap+0x327/0x490 drivers/staging/android/ashmem.c:399
call_mmap include/linux/fs.h:1779 [inline]
mmap_region+0x858/0x1030 mm/mmap.c:1722
do_mmap+0x5b8/0xcd0 mm/mmap.c:1500
do_mmap_pgoff include/linux/mm.h:2165 [inline]
vm_mmap_pgoff+0x17a/0x1d0 mm/util.c:333
SYSC_mmap_pgoff mm/mmap.c:1550 [inline]
SyS_mmap_pgoff+0x3ca/0x520 mm/mmap.c:1508
SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x441289
RSP: 002b:00007ffea8a14b78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441289
RDX: 0000000000000000 RSI: 0000000000001000 RDI: 0000000020ffc000
RBP: 00000000006cb018 R08: 0000000000000003 R09: 0000000000000000
R10: 0080000000000012 R11: 0000000000000246 R12: 0000000000402000
R13: 0000000000402090 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 23, 2019, 6:26:05 AM4/23/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: c98875d9 Linux 4.19.36
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=146444f4a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=5e40ac5fbcc6366d
dashboard link: https://syzkaller.appspot.com/bug?extid=ead1d509a8fe6cace0ef
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1060ac88a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=170a3947200000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+ead1d5...@syzkaller.appspotmail.com

audit: type=1400 audit(1556013134.198:36): avc: denied { map } for
pid=7770 comm="syz-executor064" path="/root/syz-executor064776623"
dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
------------[ cut here ]------------
audit: type=1400 audit(1556013134.198:37): avc: denied { map } for
pid=7777 comm="syz-executor064" path="/dev/ashmem" dev="devtmpfs" ino=16040
scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1
memory commitment underflow
WARNING: CPU: 0 PID: 7777 at mm/util.c:650 __vm_enough_memory+0x47f/0x5a0
mm/util.c:650
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 7777 Comm: syz-executor064 Not tainted 4.19.36 #4
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
panic+0x263/0x51d kernel/panic.c:185
__warn.cold+0x20/0x54 kernel/panic.c:540
report_bug+0x263/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x204/0x360 arch/x86/kernel/traps.c:296
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:997
RIP: 0010:__vm_enough_memory+0x47f/0x5a0 mm/util.c:650
Code: e8 16 97 db ff 0f b6 75 d0 40 84 f6 0f 85 4c fc ff ff e8 c4 95 db ff
48 c7 c7 60 b9 52 87 c6 05 bd 44 a6 07 01 e8 df 71 af ff <0f> 0b 48 b8 00
00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 0f b6 14
RSP: 0018:ffff88808fff7a68 EFLAGS: 00010286
RAX: 0000000000000000 RBX: fff8000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8155df26 RDI: ffffed1011ffef3f
RBP: ffff88808fff7aa0 R08: ffff88809833e140 R09: ffffed1015d03ee3
R10: ffffed1015d03ee2 R11: ffff8880ae81f717 R12: 0000000000000001
R13: ffff88807df54940 R14: ffffffff88821580 R15: 0000000000000c68
security_vm_enough_memory_mm+0xa0/0xd0 security/security.c:338
shmem_acct_size mm/shmem.c:150 [inline]
__shmem_file_setup.part.0+0x194/0x2b0 mm/shmem.c:3948
__shmem_file_setup mm/shmem.c:3945 [inline]
shmem_file_setup+0x66/0x90 mm/shmem.c:3992
ashmem_mmap+0x35f/0x520 drivers/staging/android/ashmem.c:388
call_mmap include/linux/fs.h:1816 [inline]
mmap_region+0xc34/0x1760 mm/mmap.c:1762
do_mmap+0x8e2/0x1080 mm/mmap.c:1535
do_mmap_pgoff include/linux/mm.h:2306 [inline]
vm_mmap_pgoff+0x1c5/0x230 mm/util.c:357
ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1585
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline]
__x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441289
Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcacd057d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
Reply all
Reply to author
Forward
0 new messages