From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f205.google.com (mail-il1-f205.google.com [209.85.166.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA59F481DD for ; Tue, 28 Jan 2025 01:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.205 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738029567; cv=none; b=fepRSbsHjJ7reAougigdOsOc6TRF6Gx3YyACfoY0DWoFiLp4IZ3GodI8JMVLO1A87nBE5YtNGBjpySeZ2KdlJlWcipo90kIyJb1qKCf4fviwF6fb9sDXX2LSpf0vnpV5tEjwXaeB5aYXw7dgGgbXPBKhlSV3Ry25vGOpysVxSQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738029567; c=relaxed/simple; bh=HP6+LC386Lv1ivOEcmaqMN6xalT88/RcAeeUEYOY+jU=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=vEw7SdeYTcIaS19hAhA16DoMG/GMskHYV5bUh4U8MryKxTixO+nLfq5cL0CRQpRFZNEG/NUEvnWae26qNlIQVwlf1tZ8q/61+QLbopwL9JhmM9ZEm6dsgprqv1Q6ySP0nxLx4Alyy12tWZAPHH6dggyY2fIV4txcfQFtC0N5hnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f205.google.com with SMTP id e9e14a558f8ab-3a7e39b48a2so96688315ab.0 for ; Mon, 27 Jan 2025 17:59:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738029565; x=1738634365; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fxzp02EXFHTUJ8e54+XJ6yEbNtPRC9wdaKaZQM9cTF0=; b=f2kTKQtNZ6Bta/zU5W1HSltkLBaLOB3xy3UUHYJQ81OwzFQ3faTYra6r+5P7wLYBKB wT2+khLxFGENlApGkKuT+kKJiahPWiUAuwMBZ3RU8ThJW0Nv9b94E12BeMZ/+GaMN9ZM GSKuvhxA+oKH4VT+1gOi+oLLq4GkaszJ3IZDfMnFlTlt6HtxlIQfReS6b0VGqYBe/be8 wsUjULRWu6p/gdoL+8KT2kFbofYGUEZI1zc+vT29dXhkOxfCG8KOtOpdvnoiy5Lk9d69 ISMvV22QGU5a8KyHfqF0EBWLud+kp7zjeyrlN2CKGup3DRcmAeNCfiFNmSabyDX3eR6n h00g== X-Gm-Message-State: AOJu0YwNynKoXr0nLt45/ClaU78bBErvkfz9lf3jS5F/oGBvLGBWTMh6 dWzv8Z1k3ni3mgXetvuNqH4Shvh9tFcFytSyFcp4KSqjnoMWLLXhH2Gs1WMBWQrUphoAcfHUkJB yeqkQVFxsJxjD0JMq57rae58o3zqtoBFVpJdCbasrDOUs6xTeER5HWWEpTQ== X-Google-Smtp-Source: AGHT+IH0DHwaxuB1afXsaQO+BFYhD0+5LIuyAAdUCSuZYV11WlrM5DIaPSNb+xCBof4DLv6Y5JjspOQSImTA9UwztGNC7gZR7vnh Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a92:ca0a:0:b0:3cf:c8bf:3b87 with SMTP id e9e14a558f8ab-3cfc8bf3cb0mr122707045ab.1.1738029565039; Mon, 27 Jan 2025 17:59:25 -0800 (PST) Date: Mon, 27 Jan 2025 17:59:25 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <679839fd.050a0220.ac840.023e.GAE@google.com> Subject: [syzbot] [kernel?] KASAN: slab-use-after-free Read in notifier_call_chain From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 9c5968db9e62 Merge tag 'mm-stable-2025-01-26-14-59' of git.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11d966b0580000 kernel config: https://syzkaller.appspot.com/x/.config?x=2ae8afe424ee551e dashboard link: https://syzkaller.appspot.com/bug?extid=00043c56bec9d340a2c4 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/f36a737a72a6/disk-9c5968db.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/481939d888cd/vmlinux-9c5968db.xz kernel image: https://storage.googleapis.com/syzbot-assets/abcff7a35655/bzImage-9c5968db.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+00043c56bec9d340a2c4@syzkaller.appspotmail.com ================================================================== BUG: KASAN: slab-use-after-free in notifier_call_chain+0x3bf/0x410 kernel/notifier.c:75 Read of size 8 at addr ffff88804609d8d0 by task init/9711 CPU: 0 UID: 0 PID: 9711 Comm: init Not tainted 6.13.0-syzkaller-08265-g9c5968db9e62 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 notifier_call_chain+0x3bf/0x410 kernel/notifier.c:75 blocking_notifier_call_chain kernel/notifier.c:380 [inline] blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368 kernel_shutdown_prepare kernel/reboot.c:299 [inline] kernel_power_off+0x1c/0xb0 kernel/reboot.c:702 __do_sys_reboot+0x376/0x3e0 kernel/reboot.c:777 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f55ec7548b4 Code: f0 ff ff 73 01 c3 48 8b 0d 71 55 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 89 fa be 69 19 12 28 bf ad de e1 fe b8 a9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 45 55 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc1fa87488 EFLAGS: 00000246 ORIG_RAX: 00000000000000a9 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f55ec7548b4 RDX: 000000004321fedc RSI: 0000000028121969 RDI: 00000000fee1dead RBP: 000000004321fedc R08: 0000000000000000 R09: 0000000000000000 R10: 00007ffc1fa87460 R11: 0000000000000246 R12: 00007f55ec8fb4a0 R13: 00007ffc1fa874e8 R14: 0000559235de3169 R15: 00007f55ec932a80 Allocated by task 9635: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0xcb3/0x2170 security/tomoyo/audit.c:264 tomoyo_supervisor+0x313/0x12f0 security/tomoyo/common.c:2119 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x193/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xed4/0x20c0 security/tomoyo/domain.c:888 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x1b9/0x1e0 security/security.c:1302 search_binary_handler fs/exec.c:1765 [inline] exec_binprm fs/exec.c:1807 [inline] bprm_execve fs/exec.c:1859 [inline] bprm_execve+0x832/0x16d0 fs/exec.c:1835 do_execveat_common.isra.0+0x4a2/0x610 fs/exec.c:1966 do_execve fs/exec.c:2040 [inline] __do_sys_execve fs/exec.c:2116 [inline] __se_sys_execve fs/exec.c:2111 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2111 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 9635: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x2c4/0x4d0 mm/slub.c:4757 tomoyo_init_log+0x1531/0x2170 security/tomoyo/audit.c:293 tomoyo_supervisor+0x313/0x12f0 security/tomoyo/common.c:2119 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x193/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xed4/0x20c0 security/tomoyo/domain.c:888 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x1b9/0x1e0 security/security.c:1302 search_binary_handler fs/exec.c:1765 [inline] exec_binprm fs/exec.c:1807 [inline] bprm_execve fs/exec.c:1859 [inline] bprm_execve+0x832/0x16d0 fs/exec.c:1835 do_execveat_common.isra.0+0x4a2/0x610 fs/exec.c:1966 do_execve fs/exec.c:2040 [inline] __do_sys_execve fs/exec.c:2116 [inline] __se_sys_execve fs/exec.c:2111 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2111 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88804609c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6352 bytes inside of freed 8192-byte region [ffff88804609c000, ffff88804609e000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x46098 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b042280 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b042280 dead000000000100 dead000000000122 head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001182601 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6778, tgid 6768 (syz.2.229), ts 124635128907, free_ts 116666114866 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 alloc_pages_mpol+0x1fc/0x540 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2587 [inline] new_slab+0x23d/0x330 mm/slub.c:2640 ___slab_alloc+0xc5d/0x1720 mm/slub.c:3826 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_noprof+0x2ec/0x510 mm/slub.c:4306 kmalloc_noprof include/linux/slab.h:905 [inline] kernfs_fop_write_iter+0x223/0x500 fs/kernfs/file.c:311 iter_file_splice_write+0x90f/0x10b0 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x18f/0x6c0 fs/splice.c:1164 splice_direct_to_actor+0x346/0xa40 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x178/0x250 fs/splice.c:1233 do_sendfile+0xafb/0xe40 fs/read_write.c:1363 __do_sys_sendfile64 fs/read_write.c:1424 [inline] __se_sys_sendfile64 fs/read_write.c:1410 [inline] __x64_sys_sendfile64+0x1da/0x220 fs/read_write.c:1410 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 page last free pid 5894 tgid 5894 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2900 [inline] apply_to_pmd_range mm/memory.c:2944 [inline] apply_to_pud_range mm/memory.c:2980 [inline] apply_to_p4d_range mm/memory.c:3016 [inline] __apply_to_page_range+0x5fd/0xd30 mm/memory.c:3050 kasan_release_vmalloc+0xd1/0xe0 mm/kasan/shadow.c:529 kasan_release_vmalloc_node mm/vmalloc.c:2196 [inline] purge_vmap_node+0x1d1/0xa40 mm/vmalloc.c:2213 __purge_vmap_area_lazy+0x9bf/0xc10 mm/vmalloc.c:2304 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2338 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3398 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88804609d780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804609d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804609d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804609d900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804609d980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup