syzbot


general protection fault in ebitmap_destroy

Status: fixed on 2019/03/06 07:43
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+6664500f0f18f07a5c0e@syzkaller.appspotmail.com
Fix commit: 5b0e7310a2a3 selinux: fix GPF on invalid policy
First crash: 1932d, last: 1932d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 4.19 00/99] 4.19.17-stable review 109 (109) 2019/04/22 19:40
[PATCH 4.4 000/104] 4.4.172-stable review 111 (111) 2019/01/30 07:30
[PATCH 3.18 00/52] 3.18.133-stable review 55 (55) 2019/01/25 23:16
[PATCH 4.14 00/59] 4.14.95-stable review 65 (65) 2019/01/23 12:55
[PATCH 4.9 00/51] 4.9.152-stable review 56 (56) 2019/01/23 09:06
[PATCH 4.20 000/111] 4.20.4-stable review 120 (120) 2019/01/23 06:43
general protection fault in ebitmap_destroy 2 (3) 2019/01/11 01:26
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 general protection fault in ebitmap_destroy C 3 1922d 1839d 0/2 public: reported C repro on 2019/04/13 00:01
android-414 general protection fault in ebitmap_destroy syz 1 1932d 1841d 0/1 public: reported syz repro on 2019/04/10 16:14
upstream general protection fault in ebitmap_destroy (2) selinux C done 36 1860d 1868d 11/26 fixed on 2019/04/01 10:28
android-49 general protection fault in ebitmap_destroy C 2216 1604d 1841d 0/3 public: reported C repro on 2019/04/11 08:44

Sample crash report:
SELinux: failed to load policy
sel_write_load: 238 callbacks suppressed
SELinux: failed to load policy
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9316 Comm: syz-executor2 Not tainted 5.0.0-rc1+ #16
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ebitmap_destroy+0x32/0xf0 security/selinux/ss/ebitmap.c:334
Code: 49 89 fd 41 54 53 e8 9d e6 36 fe 4d 85 ed 0f 84 99 00 00 00 e8 8f e6 36 fe 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 98 00 00 00 49 be 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffff88808967f5c0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff88808967f6a8 RCX: dffffc0000000000
RDX: 0000000000000001 RSI: ffffffff834b1081 RDI: 0000000000000008
RBP: ffff88808967f5e0 R08: ffff8880972a8140 R09: ffffed1015cc5b90
R10: ffffed1015cc5b8f R11: ffff8880ae62dc7b R12: ffff888099d993c0
R13: 0000000000000008 R14: ffff888099d993c0 R15: ffff88808967f648
FS:  00007f70cd9e5700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000015e7938 CR3: 0000000096c4a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 sens_destroy+0x49/0xa0 security/selinux/ss/policydb.c:735
 sens_read+0x25d/0x460 security/selinux/ss/policydb.c:1636
 policydb_read+0xed9/0x60d0 security/selinux/ss/policydb.c:2430
 security_load_policy+0x423/0x1830 security/selinux/ss/services.c:2129
 sel_write_load+0x25a/0x470 security/selinux/selinuxfs.c:565
 __vfs_write+0x116/0xb40 fs/read_write.c:485
 vfs_write+0x20c/0x580 fs/read_write.c:549
 ksys_write+0x105/0x260 fs/read_write.c:598
 __do_sys_write fs/read_write.c:610 [inline]
 __se_sys_write fs/read_write.c:607 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:607
 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457ec9
Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f70cd9e4c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457ec9
RDX: 000000000000005c RSI: 0000000020000000 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f70cd9e56d4
R13: 00000000004c720f R14: 00000000004dc9a0 R15: 00000000ffffffff
Modules linked in:
---[ end trace 78ea480790940b53 ]---
RIP: 0010:ebitmap_destroy+0x32/0xf0 security/selinux/ss/ebitmap.c:334
Code: 49 89 fd 41 54 53 e8 9d e6 36 fe 4d 85 ed 0f 84 99 00 00 00 e8 8f e6 36 fe 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 98 00 00 00 49 be 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffff88808967f5c0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff88808967f6a8 RCX: dffffc0000000000
RDX: 0000000000000001 RSI: ffffffff834b1081 RDI: 0000000000000008
RBP: ffff88808967f5e0 R08: ffff8880972a8140 R09: ffffed1015cc5b90
R10: ffffed1015cc5b8f R11: ffff8880ae62dc7b R12: ffff888099d993c0
R13: 0000000000000008 R14: ffff888099d993c0 R15: ffff88808967f648
FS:  00007f70cd9e5700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000073c000 CR3: 0000000096c4a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/01/09 14:38 upstream a88cc8da0279 45c0c1b1 .config console log report syz ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.