x_tables: ip6_tables: CLASSIFY target: used from hooks PREROUTING, but only usable from FORWARD/OUTPUT/POSTROUTING ================================================================== BUG: KASAN: stack-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:131 [inline] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x10a0/0x1400 arch/x86/kernel/unwind_orc.c:410 Read of size 8 at addr ffff8880509e7d30 by task syz-executor.1/2244 CPU: 1 PID: 2244 Comm: syz-executor.1 Not tainted 4.19.197-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 user_mode arch/x86/include/asm/ptrace.h:131 [inline] unwind_next_frame+0x10a0/0x1400 arch/x86/kernel/unwind_orc.c:410 perf_callchain_kernel+0x3fa/0x5c0 arch/x86/events/core.c:2346 get_perf_callchain+0x392/0x860 kernel/events/callchain.c:202 perf_callchain+0x165/0x1c0 kernel/events/core.c:6474 perf_prepare_sample+0x81e/0x1620 kernel/events/core.c:6501 __perf_event_output kernel/events/core.c:6616 [inline] perf_event_output_forward+0xf3/0x270 kernel/events/core.c:6634 __perf_event_overflow+0x13c/0x370 kernel/events/core.c:7907 perf_swevent_hrtimer+0x272/0x3e0 kernel/events/core.c:9261 __run_hrtimer kernel/time/hrtimer.c:1419 [inline] __hrtimer_run_queues+0x3f6/0xe60 kernel/time/hrtimer.c:1481 hrtimer_interrupt+0x326/0x9e0 kernel/time/hrtimer.c:1539 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1071 [inline] smp_apic_timer_interrupt+0x10c/0x550 arch/x86/kernel/apic/apic.c:1096 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:arch_local_save_flags arch/x86/include/asm/paravirt.h:784 [inline] RIP: 0010:___might_sleep+0x183/0x2b0 kernel/sched/core.c:6159 Code: 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 0d 01 00 00 48 83 3d 84 10 b0 08 00 0f 84 fd 00 00 00 9c <58> 0f 1f 44 00 00 f6 c4 02 0f 84 fa fe ff ff 65 4c 8b 2c 25 80 df RSP: 0018:ffff8880509e7c38 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3048 RBX: 0000000000000000 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: 00000000ffffffff RDI: ffff8880525fc830 RBP: ffffffff886a0980 R08: ffffffff81b1e6b0 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000399 R13: 0000000000000000 R14: ffff8880525fc4c0 R15: ffff8880b1ac9118 blkdev_put+0x30/0x520 fs/block_dev.c:1839 retint_kernel+0x2d/0x2d RIP: 8c66205b:trace_hardirqs_on_thunk+0x1a/0x1c Code: Bad RIP value. RSP: 0000:ffffed1017424552 EFLAGS: ffff8880ba122a93 ORIG_RAX: ffff8880509e7d78 RAX: 0000000000000000 RBX: ffffffff89b70ec0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff814b57c8 RDI: 0000000000000000 RBP: 0000000041b58ab3 R08: 0000000000000000 R09: ffffffff81003ce4 R10: ffff8880525fc4c0 R11: ffffffff8817b620 R12: ffffffff81b1e6b0 R13: ffffffff81003ce4 R14: ffff8880525fc4c0 R15: ffff88809ea32e20 The buggy address belongs to the page: page:ffffea00014279c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfff00000000000() raw: 00fff00000000000 0000000000000000 ffffffff01420101 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880509e7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880509e7c80: 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 >ffff8880509e7d00: f2 00 00 00 f2 f2 f2 00 00 00 00 00 f3 f3 f3 f3 ^ ffff8880509e7d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880509e7e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================