audit: type=1804 audit(1621502171.965:6): pid=9776 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.2" name="/root/syzkaller-testdir273049021/syzkaller.F8uKQz/7/file0/file0" dev="sda1" ino=13958 res=1 loop2: unable to read partition table ip6_tables: ip6tables: counters copy to user failed while replacing table FAT-fs (loop1): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) ================================================================== BUG: KASAN: slab-out-of-bounds in ipt_init_target+0x213/0x250 net/sched/act_ipt.c:46 Read of size 1 at addr ffff8880af17839f by task syz-executor.1/9819 CPU: 0 PID: 9819 Comm: syz-executor.1 Not tainted 4.14.232-syzkaller #0 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+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427 ipt_init_target+0x213/0x250 net/sched/act_ipt.c:46 __tcf_ipt_init+0x48d/0xc00 net/sched/act_ipt.c:168 tcf_ipt_init+0x43/0x50 net/sched/act_ipt.c:202 tcf_action_init_1+0x51a/0x9e0 net/sched/act_api.c:682 tcf_action_init+0x26d/0x400 net/sched/act_api.c:751 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x2e3/0x510 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x4665d9 RSP: 002b:00007f58241c6188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 0000000020000380 RDI: 0000000000000007 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007fffa6795a2f R14: 00007f58241c6300 R15: 0000000000022000 Allocated by task 9819: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc_track_caller+0x155/0x400 mm/slab.c:3735 kmemdup+0x23/0x50 mm/util.c:118 kmemdup include/linux/string.h:449 [inline] __tcf_ipt_init+0x464/0xc00 net/sched/act_ipt.c:164 tcf_ipt_init+0x43/0x50 net/sched/act_ipt.c:202 tcf_action_init_1+0x51a/0x9e0 net/sched/act_api.c:682 tcf_action_init+0x26d/0x400 net/sched/act_api.c:751 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x2e3/0x510 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 4845: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 aa_free_task_context+0xda/0x130 security/apparmor/context.c:54 apparmor_cred_free+0x34/0x70 security/apparmor/lsm.c:58 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x780/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 The buggy address belongs to the object at ffff8880af178380 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes inside of 32-byte region [ffff8880af178380, ffff8880af1783a0) The buggy address belongs to the page: page:ffffea0002bc5e00 count:1 mapcount:0 mapping:ffff8880af178000 index:0xffff8880af178fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880af178000 ffff8880af178fc1 000000010000003f raw: ffffea00026cdce0 ffffea0002d51020 ffff88813fe801c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880af178280: 00 00 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc ffff8880af178300: 00 00 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc >ffff8880af178380: 04 fc fc fc fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff8880af178400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880af178480: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== loop2: partition table beyond EOD, truncated audit: type=1804 audit(1621502173.085:7): pid=9822 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir784369750/syzkaller.FmLwKv/8/bus" dev="sda1" ino=13943 res=1 loop_reread_partitions: partition scan of loop2 () failed (rc=-5) SQUASHFS error: zlib decompression failed, data probably corrupt ip6_tables: ip6tables: counters copy to user failed while replacing table ldm_validate_privheads(): Disk read failed. Dev loop2: unable to read RDB block 1 SQUASHFS error: squashfs_read_data failed to read block 0x99 loop2: unable to read partition table SQUASHFS error: Unable to read metadata cache entry [99] loop2: partition table beyond EOD, truncated SQUASHFS error: Unable to read inode 0x126