==================================================================
BUG: KASAN: slab-out-of-bounds in strcmp+0x96/0xb0 lib/string.c:328
Read of size 1 at addr ffff8801d8d60e46 by task syz-executor3/3884

CPU: 1 PID: 3884 Comm: syz-executor3 Not tainted 4.15.0-rc2-next-20171204+ #58
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:5986
 security_setprocattr+0x85/0xc0 security/security.c:1264
 proc_pid_attr_write+0x1e6/0x280 fs/proc/base.c:2574
 __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:00007f7e65d69c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f7e65d69950 RCX: 00000000004529d9
RDX: 0000000020eeeff8 RSI: 0000000000000014 RDI: 0000000000000014
RBP: 00007f7e65d69940 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000006 R11: 0000000000000212 R12: 00000000004b7354
R13: 00007f7e65d69ac8 R14: 00000000004b7366 R15: 0000000000000000

Allocated by task 3884:
 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:3712 [inline]
 __kmalloc_track_caller+0x15e/0x760 mm/slab.c:3727
 memdup_user+0x2c/0x90 mm/util.c:164
 proc_pid_attr_write+0x115/0x280 fs/proc/base.c:2563
 __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 2546:
 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:3492 [inline]
 kfree+0xca/0x250 mm/slab.c:3807
 selinux_cred_free+0x48/0x70 security/selinux/hooks.c:3815
 security_cred_free+0x48/0x80 security/security.c:995
 put_cred_rcu+0x106/0x400 kernel/cred.c:117
 __rcu_reclaim kernel/rcu/rcu.h:172 [inline]
 rcu_do_batch kernel/rcu/tree.c:2689 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2948 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2915 [inline]
 rcu_process_callbacks+0xd74/0x17d0 kernel/rcu/tree.c:2932
 __do_softirq+0x29d/0xbb2 kernel/softirq.c:285

The buggy address belongs to the object at ffff8801d8d60e40
 which belongs to the cache kmalloc-32 of size 32
The buggy address is located 6 bytes inside of
 32-byte region [ffff8801d8d60e40, ffff8801d8d60e60)
The buggy address belongs to the page:
page:00000000f06e9f03 count:1 mapcount:0 mapping:00000000849a8645 index:0xffff8801d8d60fc1
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801d8d60000 ffff8801d8d60fc1 000000010000003f
raw: ffffea0007647b60 ffffea0007623060 ffff8801db0001c0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801d8d60d00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
 ffff8801d8d60d80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
>ffff8801d8d60e00: fb fb fb fb fc fc fc fc 06 fc fc fc fc fc fc fc
                                           ^
 ffff8801d8d60e80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
 ffff8801d8d60f00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
==================================================================