syzbot


general protection fault in aa_sock_msg_perm

Status: closed as dup on 2019/09/11 23:38
Subsystems: apparmor
[Documentation on labels]
Reported-by: syzbot+2f5c8bcfb1a85d2d5961@syzkaller.appspotmail.com
First crash: 1661d, last: 1628d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in rxrpc_send_keepalive afs net C error 694 1621d 1693d

Sample crash report:
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: 1 PID: 17 Comm: kworker/1:0 Not tainted 5.4.0-rc2+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: krxrpcd rxrpc_peer_keepalive_worker
RIP: 0010:aa_sock_msg_perm.isra.0+0x41/0x170 security/apparmor/lsm.c:921
Code: 89 d3 e8 a2 75 61 fe 48 85 db 0f 84 9e 00 00 00 e8 94 75 61 fe 4c 8d 7b 18 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ff 00 00 00 48 83 7b 18 00 0f 84 8e 00 00 00 e8
RSP: 0018:ffff8880a995f9b0 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: 00000000ffffffff RCX: ffff8880a995fb20
RDX: 0000000020000002 RSI: ffffffff83119cfc RDI: ffffffff87e100e0
RBP: ffff8880a995f9d8 R08: ffff8880a9952480 R09: fffffbfff14ee34b
R10: fffffbfff14ee34a R11: ffffffff8a771a57 R12: ffff8880a995fb20
R13: ffffffff87e100e0 R14: 0000000000000002 R15: 0000000100000017
FS:  0000000000000000(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2fe24000 CR3: 00000000683a9000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 apparmor_socket_sendmsg+0x2a/0x30 security/apparmor/lsm.c:936
 security_socket_sendmsg+0x77/0xc0 security/security.c:2013
 sock_sendmsg+0x45/0x130 net/socket.c:654
 kernel_sendmsg+0x44/0x50 net/socket.c:677
 rxrpc_send_keepalive+0x1ff/0x940 net/rxrpc/output.c:655
 rxrpc_peer_keepalive_dispatch net/rxrpc/peer_event.c:369 [inline]
 rxrpc_peer_keepalive_worker+0x7be/0xd02 net/rxrpc/peer_event.c:430
 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269
 worker_thread+0x98/0xe40 kernel/workqueue.c:2415
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Modules linked in:
---[ end trace 6dec98a1db9b509c ]---
RIP: 0010:aa_sock_msg_perm.isra.0+0x41/0x170 security/apparmor/lsm.c:921
Code: 89 d3 e8 a2 75 61 fe 48 85 db 0f 84 9e 00 00 00 e8 94 75 61 fe 4c 8d 7b 18 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ff 00 00 00 48 83 7b 18 00 0f 84 8e 00 00 00 e8
RSP: 0018:ffff8880a995f9b0 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: 00000000ffffffff RCX: ffff8880a995fb20
RDX: 0000000020000002 RSI: ffffffff83119cfc RDI: ffffffff87e100e0
RBP: ffff8880a995f9d8 R08: ffff8880a9952480 R09: fffffbfff14ee34b
R10: fffffbfff14ee34a R11: ffffffff8a771a57 R12: ffff8880a995fb20
R13: ffffffff87e100e0 R14: 0000000000000002 R15: 0000000100000017
FS:  0000000000000000(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb0da732db8 CR3: 000000009c957000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/14 03:34 upstream da94001239cc 2f661ec4 .config console log report ci-upstream-kasan-gce-root
2019/09/17 09:01 upstream cef7298262e9 51ca0454 .config console log report ci-upstream-kasan-gce
2019/09/10 20:44 net-old c8dc55956b09 a60cb4cd .config console log report ci-upstream-net-this-kasan-gce
* Struck through repros no longer work on HEAD.