================================================================== BUG: KASAN: slab-out-of-bounds in strcmp+0x96/0xb0 lib/string.c:328 Read of size 1 at addr ffff8801cb343d02 by task syz-executor0/20500 CPU: 0 PID: 20500 Comm: syz-executor0 Not tainted 4.15.0-rc1+ #205 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+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 strcmp+0x96/0xb0 lib/string.c:328 security_context_to_sid_core+0x437/0x620 security/selinux/ss/services.c:1420 security_context_to_sid+0x32/0x40 security/selinux/ss/services.c:1479 selinux_setprocattr+0x51c/0xb50 security/selinux/hooks.c:5985 security_setprocattr+0x85/0xc0 security/security.c:1264 proc_pid_attr_write+0x1e6/0x280 fs/proc/base.c:2545 __vfs_write+0xef/0x970 fs/read_write.c:480 __kernel_write+0xfe/0x350 fs/read_write.c:501 write_pipe_buf+0x175/0x220 fs/splice.c:797 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x328/0x730 fs/splice.c:626 splice_from_pipe+0x1e9/0x330 fs/splice.c:661 default_file_splice_write+0x40/0x90 fs/splice.c:809 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x125/0x180 fs/splice.c:1018 splice_direct_to_actor+0x2c1/0x820 fs/splice.c:973 do_splice_direct+0x2a7/0x3d0 fs/splice.c:1061 do_sendfile+0x5d5/0xe90 fs/read_write.c:1413 SYSC_sendfile64 fs/read_write.c:1468 [inline] SyS_sendfile64+0xbd/0x160 fs/read_write.c:1460 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x4529d9 RSP: 002b:00007f1821d5cc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f1821d5c940 RCX: 00000000004529d9 RDX: 00000000208befff RSI: 0000000000000013 RDI: 0000000000000013 RBP: 00007f1821d5c930 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000212 R12: 00000000004b7369 R13: 00007f1821d5cab8 R14: 00000000004b7379 R15: 0000000000000000 Allocated by task 20500: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3711 [inline] __kmalloc_track_caller+0x15e/0x760 mm/slab.c:3726 memdup_user+0x2c/0x90 mm/util.c:164 proc_pid_attr_write+0x115/0x280 fs/proc/base.c:2534 __vfs_write+0xef/0x970 fs/read_write.c:480 __kernel_write+0xfe/0x350 fs/read_write.c:501 write_pipe_buf+0x175/0x220 fs/splice.c:797 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x328/0x730 fs/splice.c:626 splice_from_pipe+0x1e9/0x330 fs/splice.c:661 default_file_splice_write+0x40/0x90 fs/splice.c:809 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x125/0x180 fs/splice.c:1018 splice_direct_to_actor+0x2c1/0x820 fs/splice.c:973 do_splice_direct+0x2a7/0x3d0 fs/splice.c:1061 do_sendfile+0x5d5/0xe90 fs/read_write.c:1413 SYSC_sendfile64 fs/read_write.c:1468 [inline] SyS_sendfile64+0xbd/0x160 fs/read_write.c:1460 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 18888: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3491 [inline] kfree+0xca/0x250 mm/slab.c:3806 dccp_feat_val_destructor+0xd2/0xf0 net/dccp/feat.c:388 dccp_feat_entry_destructor.part.5+0x40/0x60 net/dccp/feat.c:417 dccp_feat_entry_destructor net/dccp/feat.c:416 [inline] dccp_feat_list_purge+0xc2/0x1e0 net/dccp/feat.c:549 dccp_destroy_sock+0x2f4/0x3f0 net/dccp/proto.c:236 dccp_v6_destroy_sock+0x15/0x20 net/dccp/ipv6.c:1017 inet_csk_destroy_sock+0x166/0x3f0 net/ipv4/inet_connection_sock.c:832 dccp_close+0x84d/0xc10 net/dccp/proto.c:1074 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:426 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:433 sock_release+0x8d/0x1e0 net/socket.c:596 SYSC_socketpair net/socket.c:1448 [inline] SyS_socketpair+0x4da/0x640 net/socket.c:1352 entry_SYSCALL_64_fastpath+0x1f/0x96 The buggy address belongs to the object at ffff8801cb343d00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 2 bytes inside of 32-byte region [ffff8801cb343d00, ffff8801cb343d20) The buggy address belongs to the page: page:000000008c6b4edf count:1 mapcount:0 mapping:000000007a2eb327 index:0xffff8801cb343fc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cb343000 ffff8801cb343fc1 000000010000003f raw: ffffea000729b560 ffffea0007617ea0 ffff8801db0001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cb343c00: fb fb fb fb fc fc fc fc 00 02 fc fc fc fc fc fc ffff8801cb343c80: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff8801cb343d00: 02 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8801cb343d80: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8801cb343e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================