random: cc1: uninitialized urandom read (8 bytes read) audit: type=1400 audit(1548963975.605:9): avc: denied { map } for pid=1769 comm="syz-execprog" path="/root/syzkaller-shm914552412" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file permissive=1 ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: use-after-free in nf_hook include/linux/netfilter.h:198 [inline] BUG: KASAN: use-after-free in NF_HOOK include/linux/netfilter.h:248 [inline] BUG: KASAN: use-after-free in ip_local_deliver+0x43d/0x450 net/ipv4/ip_input.c:257 Read of size 8 at addr ffff8881d03a6dd0 by task syz-executor0/1933 CPU: 1 PID: 1933 Comm: syz-executor0 Not tainted 4.14.96+ #20 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x10e lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0x88/0x2a5 mm/kasan/report.c:393 Allocated by task 1933: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] kmem_cache_alloc+0xd2/0x2d0 mm/slub.c:2736 kmem_cache_alloc_node include/linux/slab.h:361 [inline] __alloc_skb+0xd7/0x550 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:980 [inline] alloc_skb_with_frags+0x85/0x500 net/core/skbuff.c:5167 sock_alloc_send_pskb+0x5a5/0x6f0 net/core/sock.c:2076 raw_send_hdrinc net/ipv4/raw.c:375 [inline] raw_sendmsg+0x1016/0x2270 net/ipv4/raw.c:654 inet_sendmsg+0x14a/0x510 net/ipv4/af_inet.c:781 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:655 sock_no_sendpage+0x132/0x1a0 net/core/sock.c:2567 inet_sendpage+0x1bb/0x5c0 net/ipv4/af_inet.c:799 kernel_sendpage+0x84/0xd0 net/socket.c:3414 sock_sendpage+0x84/0xa0 net/socket.c:870 pipe_to_sendpage+0x23d/0x300 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x331/0x740 fs/splice.c:626 splice_from_pipe+0xd9/0x140 fs/splice.c:661 do_splice_from fs/splice.c:851 [inline] direct_splice_actor+0x118/0x160 fs/splice.c:1018 splice_direct_to_actor+0x292/0x760 fs/splice.c:973 do_splice_direct+0x177/0x240 fs/splice.c:1061 do_sendfile+0x493/0xb20 fs/read_write.c:1438 SYSC_sendfile64 fs/read_write.c:1499 [inline] SyS_sendfile64+0x11f/0x140 fs/read_write.c:1485 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 Freed by task 1933: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kmem_cache_free+0xc4/0x330 mm/slub.c:2988 kfree_skbmem net/core/skbuff.c:582 [inline] kfree_skbmem+0xa0/0x100 net/core/skbuff.c:576 __kfree_skb net/core/skbuff.c:642 [inline] kfree_skb+0xcd/0x350 net/core/skbuff.c:659 ip_frag_queue net/ipv4/ip_fragment.c:507 [inline] ip_defrag+0x5f4/0x3b50 net/ipv4/ip_fragment.c:699 ip_local_deliver+0x165/0x450 net/ipv4/ip_input.c:253 dst_input include/net/dst.h:465 [inline] ip_rcv_finish+0x5c9/0x1490 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:250 [inline] ip_rcv+0x9e2/0xf7a net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1364/0x2c60 net/core/dev.c:4477 __netif_receive_skb+0x55/0x1f0 net/core/dev.c:4515 process_backlog+0x1dc/0x640 net/core/dev.c:5197 napi_poll net/core/dev.c:5595 [inline] net_rx_action+0x36b/0xcd0 net/core/dev.c:5661 The buggy address belongs to the object at ffff8881d03a6dc0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 16 bytes inside of 224-byte region [ffff8881d03a6dc0, ffff8881d03a6ea0) The buggy address belongs to the page: page:ffffea000740e980 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 0000000000000000 00000001800c000c raw: dead000000000100 dead000000000200 ffff8881dab58200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d03a6c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d03a6d00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8881d03a6d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8881d03a6e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d03a6e80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================