BUG: general protection fault in anon_vma_interval_tree_verify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We found a bug in Linux 6.10 using syzkaller. It is possibly a null
pointer dereference  bug.
The bug report is as follows, but unfortunately there is no generated
syzkaller reproducer.

Bug report:

Oops: general protection fault, probably for non-canonical address
0xdffffc000000000f: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000078-0x000000000000007f]
CPU: 0 PID: 7637 Comm: rs:main Q:Reg Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:vma_start_pgoff mm/interval_tree.c:15 [inline]
RIP: 0010:avc_start_pgoff mm/interval_tree.c:63 [inline]
RIP: 0010:anon_vma_interval_tree_verify+0x5b/0x150 mm/interval_tree.c:108
Code: 00 4d 8b 77 40 4d 89 fd 49 c1 ed 03 43 80 7c 25 00 00 74 08 4c
89 ff e8 c3 bc 1b 00 49 8b 1f 48 83 c3 78 48 89 d8 48 c1 e8 03 <42> 80
3c 20 00 74 08 48 89 df e8 a6 bc 1b 00 48 8b 1b 4c 89 f7 48
RSP: 0018:ffffc9000a457810 EFLAGS: 00010206
RAX: 000000000000000f RBX: 0000000000000078 RCX: ffff888014b75a00
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888018bafc80
RBP: ffffc9000a457970 R08: ffff888024fa2de7 R09: 1ffff110049f45bc
R10: dffffc0000000000 R11: ffffed10049f45bd R12: dffffc0000000000
R13: 1ffff11003175f88 R14: 0000000000000000 R15: ffff888018bafc40
FS:  00007f7ce5800700(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f40e98fef98 CR3: 000000001d99e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 validate_mm+0x2c0/0x510 mm/mmap.c:318
 vma_merge+0x15af/0x24b0 mm/mmap.c:1038
 vma_modify+0xb4/0x340 mm/mmap.c:2494
 vma_modify_flags include/linux/mm.h:3352 [inline]
 mprotect_fixup+0x3dc/0xa60 mm/mprotect.c:637
 do_mprotect_pkey+0x87a/0xc50 mm/mprotect.c:820
 __do_sys_mprotect mm/mprotect.c:841 [inline]
 __se_sys_mprotect mm/mprotect.c:838 [inline]
 __x64_sys_mprotect+0x7c/0x90 mm/mprotect.c:838
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x7e/0x150 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x67/0x6f
RIP: 0033:0x7f7ce69451d7
Code: 73 01 c3 48 8b 0d b9 8c 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 66
2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 0a 00 00 00 0f 05 <48> 3d
01 f0 ff ff 73 01 c3 48 8b 0d 89 8c 0d 00 f7 d8 64 89 01 48
RSP: 002b:00007f7ce57ff558 EFLAGS: 00000206 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00007f7cd4000020 RCX: 00007f7ce69451d7
RDX: 0000000000000003 RSI: 0000000000001000 RDI: 00007f7cd4044000
RBP: 0000000000000110 R08: 00007f7cd4000000 R09: 0000000000044000
R10: 0000000000000130 R11: 0000000000000206 R12: 0000000000000100
R13: 0000000000001000 R14: 00007f7cd4043f00 R15: fffffffffffff000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:vma_start_pgoff mm/interval_tree.c:15 [inline]
RIP: 0010:avc_start_pgoff mm/interval_tree.c:63 [inline]
RIP: 0010:anon_vma_interval_tree_verify+0x5b/0x150 mm/interval_tree.c:108
Code: 00 4d 8b 77 40 4d 89 fd 49 c1 ed 03 43 80 7c 25 00 00 74 08 4c
89 ff e8 c3 bc 1b 00 49 8b 1f 48 83 c3 78 48 89 d8 48 c1 e8 03 <42> 80
3c 20 00 74 08 48 89 df e8 a6 bc 1b 00 48 8b 1b 4c 89 f7 48
RSP: 0018:ffffc9000a457810 EFLAGS: 00010206
RAX: 000000000000000f RBX: 0000000000000078 RCX: ffff888014b75a00
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888018bafc80
RBP: ffffc9000a457970 R08: ffff888024fa2de7 R09: 1ffff110049f45bc
R10: dffffc0000000000 R11: ffffed10049f45bd R12: dffffc0000000000
R13: 1ffff11003175f88 R14: 0000000000000000 R15: ffff888018bafc40
FS:  00007f7ce5800700(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f40e98fef98 CR3: 000000001d99e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0: 00 4d 8b             add    %cl,-0x75(%rbp)
   3: 77 40                 ja     0x45
   5: 4d 89 fd             mov    %r15,%r13
   8: 49 c1 ed 03           shr    $0x3,%r13
   c: 43 80 7c 25 00 00     cmpb   $0x0,0x0(%r13,%r12,1)
  12: 74 08                 je     0x1c
  14: 4c 89 ff             mov    %r15,%rdi
  17: e8 c3 bc 1b 00       call   0x1bbcdf
  1c: 49 8b 1f             mov    (%r15),%rbx
  1f: 48 83 c3 78           add    $0x78,%rbx
  23: 48 89 d8             mov    %rbx,%rax
  26: 48 c1 e8 03           shr    $0x3,%rax
* 2a: 42 80 3c 20 00       cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f: 74 08                 je     0x39
  31: 48 89 df             mov    %rbx,%rdi
  34: e8 a6 bc 1b 00       call   0x1bbcdf
  39: 48 8b 1b             mov    (%rbx),%rbx
  3c: 4c 89 f7             mov    %r14,%rdi
  3f: 48                   rex.W


-- 
Yours sincerely,
Xingyu




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux