[BUG] INFO: task hung in hfsplus_commit_superblock
From: Jie Zhu
Date: Sun Jun 07 2026 - 22:08:32 EST
Hi,
While running a syzkaller fuzzing campaign against Linux mainline I hit
the following crash. I checked syzbot upstream (open / moderation / fixed,
snapshot 2026-06-06) and could not find a matching entry, so I am reporting
it here.
The underlying syzkaller program is also available; happy to send it on
request.
Thanks,
Jie Zhu
Build / environment:
Tree: Linus mainline
HEAD: f5e5d3509bffb95c6648eb9795f7f236852ae62d
(Linus mainline @ f5e5d3509bff (Merge tag
spi-fix-v7.1-rc5, 2026-05-29))
Arch: x86_64
Compiler: gcc 12+ (Debian)
Userspace: Debian bullseye (syzkaller image)
VM: QEMU 8.2, 2 vCPU, 4 GB RAM, KVM acceleration
The kernel .config and the full kernel console log are large, so they are
not inlined here per Documentation/admin-guide/reporting-issues.rst. I will
send them in a follow-up reply, or can paste them to a public service if
preferred.
Crash report (symbolicated):
INFO: task kworker/0:0:9 blocked for more than 143 seconds.
Not tainted 7.0.0-g27d128c1cff6 #5
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:0 state:D
stack:26280 pid:9 tgid:9 ppid:2 task_flags:0x4208060
flags:0x00080000
Workqueue: events_long delayed_sync_fs
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5387 [inline]
__schedule+0xc12/0x35c0 kernel/sched/core.c:7188
__schedule_loop kernel/sched/core.c:7267 [inline]
schedule+0x6b/0x1b0 kernel/sched/core.c:7282
schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7339
__mutex_lock_common kernel/locking/mutex.c:726 [inline]
__mutex_lock+0xa13/0x1270 kernel/locking/mutex.c:820
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
hfsplus_sync_fs+0x179/0x3e0 fs/hfsplus/super.c:278
delayed_sync_fs+0x5f/0x90 fs/hfsplus/super.c:301
process_one_work+0x62b/0xfd0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x3fd/0x7e0 kernel/workqueue.c:3466
kthread+0x221/0x280 kernel/kthread.c:436
ret_from_fork+0x899/0x9b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
INFO: task kworker/0:2:800 blocked for more than 143 seconds.
Not tainted 7.0.0-g27d128c1cff6 #5
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:2 state:D stack:25688 pid:800 tgid:800 ppid:2
task_flags:0x4208060 flags:0x00080000
Workqueue: events_long delayed_sync_fs
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5387 [inline]
__schedule+0xc12/0x35c0 kernel/sched/core.c:7188
__schedule_loop kernel/sched/core.c:7267 [inline]
schedule+0x6b/0x1b0 kernel/sched/core.c:7282
schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7339
__mutex_lock_common kernel/locking/mutex.c:726 [inline]
__mutex_lock+0xa13/0x1270 kernel/locking/mutex.c:820
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
hfsplus_sync_fs+0x179/0x3e0 fs/hfsplus/super.c:278
delayed_sync_fs+0x5f/0x90 fs/hfsplus/super.c:301
process_one_work+0x62b/0xfd0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x3fd/0x7e0 kernel/workqueue.c:3466
kthread+0x221/0x280 kernel/kthread.c:436
ret_from_fork+0x899/0x9b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
INFO: task kworker/1:3:4570 blocked for more than 144 seconds.
Not tainted 7.0.0-g27d128c1cff6 #5
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:3 state:D
stack:26096 pid:4570 tgid:4570 ppid:2 task_flags:0x4208060
flags:0x00080000
Workqueue: events_long delayed_sync_fs
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5387 [inline]
__schedule+0xc12/0x35c0 kernel/sched/core.c:7188
__schedule_loop kernel/sched/core.c:7267 [inline]
schedule+0x6b/0x1b0 kernel/sched/core.c:7282
schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7339
__mutex_lock_common kernel/locking/mutex.c:726 [inline]
__mutex_lock+0xa13/0x1270 kernel/locking/mutex.c:820
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
hfsplus_sync_fs+0x179/0x3e0 fs/hfsplus/super.c:278
delayed_sync_fs+0x5f/0x90 fs/hfsplus/super.c:301
process_one_work+0x62b/0xfd0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x3fd/0x7e0 kernel/workqueue.c:3466
kthread+0x221/0x280 kernel/kthread.c:436
ret_from_fork+0x899/0x9b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
INFO: task kworker/0:5:9211 blocked for more than 145 seconds.
Not tainted 7.0.0-g27d128c1cff6 #5
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:5 state:D stack:25720 pid:9211 tgid:9211 ppid:2
task_flags:0x4208060 flags:0x00080000
Workqueue: events_long delayed_sync_fs
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5387 [inline]
__schedule+0xc12/0x35c0 kernel/sched/core.c:7188
__schedule_loop kernel/sched/core.c:7267 [inline]
schedule+0x6b/0x1b0 kernel/sched/core.c:7282
schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7339
__mutex_lock_common kernel/locking/mutex.c:726 [inline]
__mutex_lock+0xa13/0x1270 kernel/locking/mutex.c:820
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
hfsplus_sync_fs+0x179/0x3e0 fs/hfsplus/super.c:278
delayed_sync_fs+0x5f/0x90 fs/hfsplus/super.c:301
process_one_work+0x62b/0xfd0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x3fd/0x7e0 kernel/workqueue.c:3466
kthread+0x221/0x280 kernel/kthread.c:436
ret_from_fork+0x899/0x9b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Showing all locks held in the system:
3 locks held by kworker/0:0/9:
#0:
ffff88810006a940
(
(wq_completion)events_long
){+.+.}-{0:0}
, at: process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc9000009fd30
(
(work_completion)(&(&sbi->sync_work)->work)
){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88807894d988
(
&sbi->vh_mutex
){+.+.}-{4:4}
, at: hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
4 locks held by kworker/u8:1/13:
#0:
ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc900000dfd30
((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff888110bb60d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff888116ac80a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff888116ac80a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
3 locks held by kworker/1:1/29:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc900001f7d30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff888060837988 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
1 lock held by khungtaskd/31:
#0: ffffffff8a7e5520 (rcu_read_lock){....}-{1:3}, at:
rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#0: ffffffff8a7e5520 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock
include/linux/rcupdate.h:838 [inline]
#0: ffffffff8a7e5520 (rcu_read_lock){....}-{1:3}, at:
debug_show_all_locks+0x36/0x1c0 kernel/locking/lockdep.c:6775
4 locks held by kworker/u8:2/34:
#0: ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc90000247d30
((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88801826a0d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff8880616520a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff8880616520a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
4 locks held by kworker/u8:3/48:
#0: ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc90000327d30
((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88807d0600d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff88810dcd00a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff88810dcd00a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
4 locks held by kworker/u8:4/56:
#0: ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc900005b7d30 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88805f5920d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff88805f59e0a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff88805f59e0a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
3 locks held by kworker/0:2/800:
#0:
ffff88810006a940
(
(wq_completion)events_long
){+.+.}-{0:0}
, at: process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1:
ffffc90002ab7d30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff888078bf7988 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
4 locks held by kworker/u8:6/1114:
#0: ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc9000496fd30
((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2:
ffff88810a8980d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff8880618b00a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff8880618b00a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
4 locks held by kworker/u8:7/1860:
#0: ffff888103eb8940 (
(wq_completion)writeback
){+.+.}-{0:0}
, at: process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1:
ffffc9000567fd30
(
(work_completion)(&(&wb->dwork)->work)
){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2:
ffff888116fea0d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff8881083320a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff8881083320a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
3 locks held by kworker/0:3/1987:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc900058efd30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88805f694988 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
3 locks held by kworker/1:3/4570:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc90002237d30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88805f03e988 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
4 locks held by kworker/u8:8/4622:
#0: ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc90001edfd30
((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88810fe620d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff88810acc60a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff88810acc60a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
1 lock held by in:imklog/8265:
3 locks held by kworker/0:4/9192:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc9000a1cfd30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88806ea12188 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
6 locks held by syz-executor/9200:
6 locks held by syz-executor/9202:
6 locks held by syz-executor/9208:
3 locks held by kworker/0:5/9211:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc9000a17fd30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff88805f5bd988 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
6 locks held by syz-executor/9214:
3 locks held by kworker/1:4/9220:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc90004eefd30
((work_completion)(&(&sbi->sync_work)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff888059839188 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
3 locks held by kworker/1:6/10380:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1:
ffffc90001ab7d30
(
(work_completion)(&(&sbi->sync_work)->work)
){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2:
ffff888060837188
(&sbi->vh_mutex
){+.+.}-{4:4}
, at: hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
6 locks held by syz-executor/10471:
11 locks held by syz-executor/10507:
6 locks held by syz-executor/10562:
6 locks held by syz-executor/10576:
4 locks held by kworker/u8:9/11593:
#0:
ffff888103eb8940
(
(wq_completion)writeback
){+.+.}-{0:0}
, at: process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1:
ffffc9000ac9fd30
(
(work_completion)(&(&wb->dwork)->work)
){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2:
ffff888078bba0d8
(
&type->s_umount_key
#59
){.+.+}-{4:4}
, at: super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3:
ffff88807eb520a8
(
&tree->tree_lock){+.+.}-{4:4}, at: hfsplus_system_write_inode
fs/hfsplus/super.c:156 [inline]
&tree->tree_lock){+.+.}-{4:4}, at: hfsplus_write_inode+0x2bf/0x3c0
fs/hfsplus/super.c:185
3 locks held by kworker/0:9/11658:
#0: ffff88810006a940 ((wq_completion)events_long){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1:
ffffc9000ad1fd30
(
(work_completion)(&(&sbi->sync_work)->work)
){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2:
ffff8880589df988 (&sbi->vh_mutex){+.+.}-{4:4}, at:
hfsplus_commit_superblock+0x61/0x460 fs/hfsplus/super.c:208
6 locks held by syz-executor/11724:
8 locks held by syz-executor/11753:
4 locks held by kworker/u8:11/11937:
#0: ffff888103eb8940 ((wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc9000b4afd30
(
(work_completion)(&(&wb->dwork)->work)
){+.+.}-{0:0}
, at: process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2:
ffff88807b5fc0d8
(
&type->s_umount_key
#59
){.+.+}-{4:4}
, at: super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff8880194220a8
(
&tree->tree_lock
){+.+.}-{4:4}
, at: hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
, at: hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
4 locks held by kworker/u8:12/12374:
#0:
ffff888103eb8940
(
(wq_completion)writeback){+.+.}-{0:0}, at:
process_one_work+0xc63/0xfd0 kernel/workqueue.c:3277
#1: ffffc9000bc8fd30
((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at:
process_one_work+0x598/0xfd0 kernel/workqueue.c:3278
#2: ffff888052ba80d8 (&type->s_umount_key#59){.+.+}-{4:4}, at:
super_trylock_shared+0x1e/0xc0 fs/super.c:565
#3: ffff8880599a40a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_system_write_inode fs/hfsplus/super.c:156 [inline]
#3: ffff8880599a40a8 (&tree->tree_lock){+.+.}-{4:4}, at:
hfsplus_write_inode+0x2bf/0x3c0 fs/hfsplus/super.c:185
1 lock held by systemd-journal/13867:
3 locks held by syz.3.527/14101:
=============================================
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 31 Comm: khungtaskd Not tainted 7.0.0-g27d128c1cff6
#5 PREEMPT(full)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix,
1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x10e/0x1f0 lib/dump_stack.c:120
nmi_cpu_backtrace+0x26d/0x360 lib/nmi_backtrace.c:113
nmi_trigger_cpumask_backtrace+0x267/0x2b0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
__sys_info lib/sys_info.c:157 [inline]
sys_info+0x133/0x180 lib/sys_info.c:165
check_hung_uninterruptible_tasks kernel/hung_task.c:353 [inline]
watchdog+0xd1e/0xf20 kernel/hung_task.c:561
kthread+0x221/0x280 kernel/kthread.c:436
ret_from_fork+0x899/0x9b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 11724 Comm: syz-executor Not tainted
7.0.0-g27d128c1cff6 #5 PREEMPT(full)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix,
1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:jhash2 include/linux/jhash.h:129 [inline]
RIP: 0010:hash_stack lib/stackdepot.c:571 [inline]
RIP: 0010:stack_depot_save_flags+0x9b/0x990 lib/stackdepot.c:672
Code: 49 f8 41 29 c2 c1 c7 04 44 01 c8 41 01 da 44 31 d7 45 89 ca 41
89 f9 41 29 fa 8d 1c 07 41 c1 c1 06 45 31 d1 44 89 cf 44 29 c8 <41> 01
d9 c1 c7 08 31 f8 29 c3 89 df 89 c3 44 01 c8 c1 c3 10 31 fb
RSP: 0018:ffffc90000007168 EFLAGS: 00000216
RAX: 000000001f2505aa RBX: 000000004021dba5 RCX: ffffc900000071d8
RDX: ffffffff810014ca RSI: 0000000000000020 RDI: 00000000a426f63c
RBP: 0000000000000013 R08: 0000000000000001 R09: 00000000a426f63c
R10: 00000000915119e3 R11: 0000000000000007 R12: 0000000000000001
R13: 0000000000000920 R14: 0000000000000013 R15: ffffc900000071c0
FS: 0000555588c46500(0000) GS:ffff8881891d4000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055557e1a39e8 CR3: 0000000017c16000 CR4: 00000000000006f0
Call Trace:
<IRQ>
kasan_save_stack+0x42/0x60 mm/kasan/common.c:58
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5295 [inline]
__kmalloc_noprof+0x319/0x820 mm/slub.c:5307
kmalloc_noprof include/linux/slab.h:954 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
cfg80211_inform_single_bss_data+0x36f/0x12e0 net/wireless/scan.c:2344
cfg80211_inform_bss_data+0x1ee/0x2c70 net/wireless/scan.c:3226
cfg80211_inform_bss_frame_data+0x1b5/0x4c0 net/wireless/scan.c:3317
ieee80211_bss_info_update+0x27e/0x7b0 net/mac80211/scan.c:230
ieee80211_scan_rx+0x31a/0x7d0 net/mac80211/scan.c:364
__ieee80211_rx_handle_packet+0x854/0xa10 net/mac80211/rx.c:5353
ieee80211_rx_list+0xbe4/0x1560 net/mac80211/rx.c:5636
ieee80211_rx_napi+0xdf/0x330 net/mac80211/rx.c:5659
ieee80211_rx include/net/mac80211.h:5395 [inline]
ieee80211_handle_queued_frames+0xa8/0xf0 net/mac80211/main.c:452
tasklet_action_common+0x182/0x1f0 kernel/softirq.c:942
handle_softirqs+0x168/0x760 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x10c/0x190 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1061
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:console_flush_one_record+0x839/0x990 kernel/printk/printk.c:3270
Code: 8d 1a 1c 00 9c 41 5c 41 81 e4 00 02 00 00 31 ff 4c 89 e6 e8 c9
ac 16 00 4d 85 e4 0f 85 31 01 00 00 e8 eb b1 16 00 fb 4c 89 f7 <e8> 32
d9 5f 00 4c 8b 63 58 e9 f8 fe ff ff e8 d4 b1 16 00 90 0f 0b
RSP: 0018:ffffc9000ad9f498 EFLAGS: 00000293
RAX: 0000000000000000 RBX: ffffffff8b5297c0 RCX: ffffffff81755cd7
RDX: ffff88805debbb00 RSI: ffffffff81755ce5 RDI: ffffffff8b529818
RBP: 0000000000000001 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 000000000000000d R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff8b529818 R15: ffffc9000ad9f5d8
console_flush_all kernel/printk/printk.c:3343 [inline]
__console_flush_and_unlock kernel/printk/printk.c:3373 [inline]
console_unlock+0xef/0x240 kernel/printk/printk.c:3413
vprintk_emit+0x3d9/0x670 kernel/printk/printk.c:2479
_printk+0xc7/0x100 kernel/printk/printk.c:2504
is_bnode_offset_valid fs/hfsplus/hfsplus_fs.h:583 [inline]
hfsplus_bnode_read+0x25a/0x320 fs/hfsplus/bnode.c:28
hfsplus_bnode_read_u16 fs/hfsplus/bnode.c:60 [inline]
hfsplus_bnode_dump+0x129/0x670 fs/hfsplus/bnode.c:362
hfsplus_brec_remove+0x366/0x3a0 fs/hfsplus/brec.c:229
__hfsplus_delete_attr+0x1f1/0x2c0 fs/hfsplus/attributes.c:339
hfsplus_delete_all_attrs+0x12c/0x290 fs/hfsplus/attributes.c:444
hfsplus_delete_cat+0x663/0x810 fs/hfsplus/catalog.c:427
hfsplus_unlink+0x196/0x5d0 fs/hfsplus/dir.c:406
vfs_unlink+0x1e5/0x710 fs/namei.c:5498
filename_unlinkat+0x33e/0x530 fs/namei.c:5568
__do_sys_unlink fs/namei.c:5603 [inline]
__se_sys_unlink fs/namei.c:5600 [inline]
__x64_sys_unlink+0x34/0x50 fs/namei.c:5600
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x116/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ffb861a9f5b
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66
2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 57 00 00 00 0f 05 <48> 3d
00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8
RSP: 002b:00007fffe63588f8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffb861a9f5b
RDX: 00007fffe6358920 RSI: 00007fffe63589b0 RDI: 00007fffe63589b0
RBP: 00007fffe63589b0 R08: 0000000000000073 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007fffe6359ab0
R13: 00007ffb86254a1b R14: 0000000000000032 R15: 000000000004012f
</TASK>
C reproducer:
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <linux/loop.h>
#ifndef __NR_memfd_create
#define __NR_memfd_create 319
#endif
static unsigned long long procid;
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
static uint64_t current_time_ms(void)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts))
exit(1);
return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}
static void use_temporary_dir(void)
{
char tmpdir_template[] = "./syzkaller.XXXXXX";
char* tmpdir = mkdtemp(tmpdir_template);
if (!tmpdir)
exit(1);
if (chmod(tmpdir, 0777))
exit(1);
if (chdir(tmpdir))
exit(1);
}
static bool write_file(const char* file, const char* what, ...)
{
char buf[1024];
va_list args;
va_start(args, what);
vsnprintf(buf, sizeof(buf), what, args);
va_end(args);
buf[sizeof(buf) - 1] = 0;
int len = strlen(buf);
int fd = open(file, O_WRONLY | O_CLOEXEC);
if (fd == -1)
return false;
if (write(fd, buf, len) != len) {
int err = errno;
close(fd);
errno = err;
return false;
}
close(fd);
return true;
}
//% This code is derived from puff.{c,h}, found in the zlib development. The
//% original files come with the following copyright notice:
//% Copyright (C) 2002-2013 Mark Adler, all rights reserved
//% version 2.3, 21 Jan 2013
//% This software is provided 'as-is', without any express or implied
//% warranty. In no event will the author be held liable for any damages
//% arising from the use of this software.
//% Permission is granted to anyone to use this software for any purpose,
//% including commercial applications, and to alter it and redistribute it
//% freely, subject to the following restrictions:
//% 1. The origin of this software must not be misrepresented; you must not
//% claim that you wrote the original software. If you use this software
//% in a product, an acknowledgment in the product documentation would be
//% appreciated but is not required.
//% 2. Altered source versions must be plainly marked as such, and must not be
//% misrepresented as being the original software.
//% 3. This notice may not be removed or altered from any source distribution.
//% Mark Adler madler@xxxxxxxxxxxxxxxxxx
//% BEGIN CODE DERIVED FROM puff.{c,h}
#define MAXBITS 15
#define MAXLCODES 286
#define MAXDCODES 30
#define MAXCODES (MAXLCODES + MAXDCODES)
#define FIXLCODES 288
struct puff_state {
unsigned char* out;
unsigned long outlen;
unsigned long outcnt;
const unsigned char* in;
unsigned long inlen;
unsigned long incnt;
int bitbuf;
int bitcnt;
jmp_buf env;
};
static int puff_bits(struct puff_state* s, int need)
{
long val = s->bitbuf;
while (s->bitcnt < need) {
if (s->incnt == s->inlen)
longjmp(s->env, 1);
val |= (long)(s->in[s->incnt++]) << s->bitcnt;
s->bitcnt += 8;
}
s->bitbuf = (int)(val >> need);
s->bitcnt -= need;
return (int)(val & ((1L << need) - 1));
}
static int puff_stored(struct puff_state* s)
{
s->bitbuf = 0;
s->bitcnt = 0;
if (s->incnt + 4 > s->inlen)
return 2;
unsigned len = s->in[s->incnt++];
len |= s->in[s->incnt++] << 8;
if (s->in[s->incnt++] != (~len & 0xff) ||
s->in[s->incnt++] != ((~len >> 8) & 0xff))
return -2;
if (s->incnt + len > s->inlen)
return 2;
if (s->outcnt + len > s->outlen)
return 1;
for (; len--; s->outcnt++, s->incnt++) {
if (s->in[s->incnt])
s->out[s->outcnt] = s->in[s->incnt];
}
return 0;
}
struct puff_huffman {
short* count;
short* symbol;
};
static int puff_decode(struct puff_state* s, const struct puff_huffman* h)
{
int first = 0;
int index = 0;
int bitbuf = s->bitbuf;
int left = s->bitcnt;
int code = first = index = 0;
int len = 1;
short* next = h->count + 1;
while (1) {
while (left--) {
code |= bitbuf & 1;
bitbuf >>= 1;
int count = *next++;
if (code - count < first) {
s->bitbuf = bitbuf;
s->bitcnt = (s->bitcnt - len) & 7;
return h->symbol[index + (code - first)];
}
index += count;
first += count;
first <<= 1;
code <<= 1;
len++;
}
left = (MAXBITS + 1) - len;
if (left == 0)
break;
if (s->incnt == s->inlen)
longjmp(s->env, 1);
bitbuf = s->in[s->incnt++];
if (left > 8)
left = 8;
}
return -10;
}
static int puff_construct(struct puff_huffman* h, const short* length, int n)
{
int len;
for (len = 0; len <= MAXBITS; len++)
h->count[len] = 0;
int symbol;
for (symbol = 0; symbol < n; symbol++)
(h->count[length[symbol]])++;
if (h->count[0] == n)
return 0;
int left = 1;
for (len = 1; len <= MAXBITS; len++) {
left <<= 1;
left -= h->count[len];
if (left < 0)
return left;
}
short offs[MAXBITS + 1];
offs[1] = 0;
for (len = 1; len < MAXBITS; len++)
offs[len + 1] = offs[len] + h->count[len];
for (symbol = 0; symbol < n; symbol++)
if (length[symbol] != 0)
h->symbol[offs[length[symbol]]++] = symbol;
return left;
}
static int puff_codes(struct puff_state* s,
const struct puff_huffman* lencode,
const struct puff_huffman* distcode)
{
static const short lens[29] = {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258};
static const short lext[29] = {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
static const short dists[30] = {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577};
static const short dext[30] = {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13};
int symbol;
do {
symbol = puff_decode(s, lencode);
if (symbol < 0)
return symbol;
if (symbol < 256) {
if (s->outcnt == s->outlen)
return 1;
if (symbol)
s->out[s->outcnt] = symbol;
s->outcnt++;
} else if (symbol > 256) {
symbol -= 257;
if (symbol >= 29)
return -10;
int len = lens[symbol] + puff_bits(s, lext[symbol]);
symbol = puff_decode(s, distcode);
if (symbol < 0)
return symbol;
unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]);
if (dist > s->outcnt)
return -11;
if (s->outcnt + len > s->outlen)
return 1;
while (len--) {
if (dist <= s->outcnt && s->out[s->outcnt - dist])
s->out[s->outcnt] = s->out[s->outcnt - dist];
s->outcnt++;
}
}
} while (symbol != 256);
return 0;
}
static int puff_fixed(struct puff_state* s)
{
static int virgin = 1;
static short lencnt[MAXBITS + 1], lensym[FIXLCODES];
static short distcnt[MAXBITS + 1], distsym[MAXDCODES];
static struct puff_huffman lencode, distcode;
if (virgin) {
lencode.count = lencnt;
lencode.symbol = lensym;
distcode.count = distcnt;
distcode.symbol = distsym;
short lengths[FIXLCODES];
int symbol;
for (symbol = 0; symbol < 144; symbol++)
lengths[symbol] = 8;
for (; symbol < 256; symbol++)
lengths[symbol] = 9;
for (; symbol < 280; symbol++)
lengths[symbol] = 7;
for (; symbol < FIXLCODES; symbol++)
lengths[symbol] = 8;
puff_construct(&lencode, lengths, FIXLCODES);
for (symbol = 0; symbol < MAXDCODES; symbol++)
lengths[symbol] = 5;
puff_construct(&distcode, lengths, MAXDCODES);
virgin = 0;
}
return puff_codes(s, &lencode, &distcode);
}
static int puff_dynamic(struct puff_state* s)
{
static const short order[19] =
{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
int nlen = puff_bits(s, 5) + 257;
int ndist = puff_bits(s, 5) + 1;
int ncode = puff_bits(s, 4) + 4;
if (nlen > MAXLCODES || ndist > MAXDCODES)
return -3;
short lengths[MAXCODES];
int index;
for (index = 0; index < ncode; index++)
lengths[order[index]] = puff_bits(s, 3);
for (; index < 19; index++)
lengths[order[index]] = 0;
short lencnt[MAXBITS + 1], lensym[MAXLCODES];
struct puff_huffman lencode = {lencnt, lensym};
int err = puff_construct(&lencode, lengths, 19);
if (err != 0)
return -4;
index = 0;
while (index < nlen + ndist) {
int symbol;
int len;
symbol = puff_decode(s, &lencode);
if (symbol < 0)
return symbol;
if (symbol < 16)
lengths[index++] = symbol;
else {
len = 0;
if (symbol == 16) {
if (index == 0)
return -5;
len = lengths[index - 1];
symbol = 3 + puff_bits(s, 2);
} else if (symbol == 17)
symbol = 3 + puff_bits(s, 3);
else
symbol = 11 + puff_bits(s, 7);
if (index + symbol > nlen + ndist)
return -6;
while (symbol--)
lengths[index++] = len;
}
}
if (lengths[256] == 0)
return -9;
err = puff_construct(&lencode, lengths, nlen);
if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1]))
return -7;
short distcnt[MAXBITS + 1], distsym[MAXDCODES];
struct puff_huffman distcode = {distcnt, distsym};
err = puff_construct(&distcode, lengths + nlen, ndist);
if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1]))
return -8;
return puff_codes(s, &lencode, &distcode);
}
static int puff(
unsigned char* dest,
unsigned long* destlen,
const unsigned char* source,
unsigned long sourcelen)
{
struct puff_state s = {
.out = dest,
.outlen = *destlen,
.outcnt = 0,
.in = source,
.inlen = sourcelen,
.incnt = 0,
.bitbuf = 0,
.bitcnt = 0,
};
int err;
if (setjmp(s.env) != 0)
err = 2;
else {
int last;
do {
last = puff_bits(&s, 1);
int type = puff_bits(&s, 2);
err = type == 0 ? puff_stored(&s) : (type == 1 ? puff_fixed(&s) :
(type == 2 ? puff_dynamic(&s) : -1));
if (err != 0)
break;
} while (!last);
}
*destlen = s.outcnt;
return err;
}
//% END CODE DERIVED FROM puff.{c,h}
#define ZLIB_HEADER_WIDTH 2
static int puff_zlib_to_file(const unsigned char* source, unsigned
long sourcelen, int dest_fd)
{
if (sourcelen < ZLIB_HEADER_WIDTH)
return 0;
source += ZLIB_HEADER_WIDTH;
sourcelen -= ZLIB_HEADER_WIDTH;
const unsigned long max_destlen = 132 << 20;
void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ, MAP_PRIVATE |
MAP_ANON, -1, 0);
if (ret == MAP_FAILED)
return -1;
unsigned char* dest = (unsigned char*)ret;
unsigned long destlen = max_destlen;
int err = puff(dest, &destlen, source, sourcelen);
if (err) {
munmap(dest, max_destlen);
errno = -err;
return -1;
}
if (write(dest_fd, dest, destlen) != (ssize_t)destlen) {
munmap(dest, max_destlen);
return -1;
}
return munmap(dest, max_destlen);
}
static int setup_loop_device(unsigned char* data, unsigned long size,
const char* loopname, int* loopfd_p)
{
int err = 0, loopfd = -1;
int memfd = syscall(__NR_memfd_create, "syzkaller", 0);
if (memfd == -1) {
err = errno;
goto error;
}
if (puff_zlib_to_file(data, size, memfd)) {
err = errno;
goto error_close_memfd;
}
loopfd = open(loopname, O_RDWR);
if (loopfd == -1) {
err = errno;
goto error_close_memfd;
}
if (ioctl(loopfd, LOOP_SET_FD, memfd)) {
if (errno != EBUSY) {
err = errno;
goto error_close_loop;
}
ioctl(loopfd, LOOP_CLR_FD, 0);
usleep(1000);
if (ioctl(loopfd, LOOP_SET_FD, memfd)) {
err = errno;
goto error_close_loop;
}
}
close(memfd);
*loopfd_p = loopfd;
return 0;
error_close_loop:
close(loopfd);
error_close_memfd:
close(memfd);
error:
errno = err;
return -1;
}
static void reset_loop_device(const char* loopname)
{
int loopfd = open(loopname, O_RDWR);
if (loopfd == -1) {
return;
}
if (ioctl(loopfd, LOOP_CLR_FD, 0)) {
}
close(loopfd);
}
static long syz_mount_image(
volatile long fsarg,
volatile long dir,
volatile long flags,
volatile long optsarg,
volatile long change_dir,
volatile unsigned long size,
volatile long image)
{
unsigned char* data = (unsigned char*)image;
int res = -1, err = 0, need_loop_device = !!size;
char* mount_opts = (char*)optsarg;
char* target = (char*)dir;
char* fs = (char*)fsarg;
char* source = NULL;
char loopname[64];
if (need_loop_device) {
int loopfd;
memset(loopname, 0, sizeof(loopname));
snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid);
if (setup_loop_device(data, size, loopname, &loopfd) == -1)
return -1;
close(loopfd);
source = loopname;
}
mkdir(target, 0777);
char opts[256];
memset(opts, 0, sizeof(opts));
if (strlen(mount_opts) > (sizeof(opts) - 32)) {
}
strncpy(opts, mount_opts, sizeof(opts) - 32);
if (strcmp(fs, "iso9660") == 0) {
flags |= MS_RDONLY;
} else if (strncmp(fs, "ext", 3) == 0) {
bool has_remount_ro = false;
char* remount_ro_start = strstr(opts, "errors=remount-ro");
if (remount_ro_start != NULL) {
char after = *(remount_ro_start + strlen("errors=remount-ro"));
char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1);
has_remount_ro = ((before == '\0' || before == ',') && (after == '\0'
|| after == ','));
}
if (strstr(opts, "errors=panic") || !has_remount_ro)
strcat(opts, ",errors=continue");
} else if (strcmp(fs, "xfs") == 0) {
strcat(opts, ",nouuid");
} else if (strncmp(fs, "gfs2", 4) == 0 && (strstr(opts,
"errors=panic") || strstr(opts, "debug"))) {
strcat(opts, ",errors=withdraw");
}
res = mount(source, target, fs, flags, opts);
if (res == -1) {
err = errno;
goto error_clear_loop;
}
res = open(target, O_RDONLY | O_DIRECTORY);
if (res == -1) {
err = errno;
goto error_clear_loop;
}
if (change_dir) {
res = chdir(target);
if (res == -1) {
err = errno;
}
}
error_clear_loop:
if (need_loop_device)
reset_loop_device(loopname);
errno = err;
return res;
}
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
static void remove_dir(const char* dir)
{
int iter = 0;
DIR* dp = 0;
const int umount_flags = MNT_FORCE | UMOUNT_NOFOLLOW;
retry:
while (umount2(dir, umount_flags) == 0) {
}
dp = opendir(dir);
if (dp == NULL) {
if (errno == EMFILE) {
exit(1);
}
exit(1);
}
struct dirent* ep = 0;
while ((ep = readdir(dp))) {
if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
continue;
char filename[FILENAME_MAX];
snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
while (umount2(filename, umount_flags) == 0) {
}
struct stat st;
if (lstat(filename, &st))
exit(1);
if (S_ISDIR(st.st_mode)) {
remove_dir(filename);
continue;
}
int i;
for (i = 0;; i++) {
if (unlink(filename) == 0)
break;
if (errno == EPERM) {
int fd = open(filename, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
}
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno != EBUSY || i > 100)
exit(1);
if (umount2(filename, umount_flags))
exit(1);
}
}
closedir(dp);
for (int i = 0;; i++) {
if (rmdir(dir) == 0)
break;
if (i < 100) {
if (errno == EPERM) {
int fd = open(dir, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
}
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno == EBUSY) {
if (umount2(dir, umount_flags))
exit(1);
continue;
}
if (errno == ENOTEMPTY) {
if (iter < 100) {
iter++;
goto retry;
}
}
}
exit(1);
}
}
static void kill_and_wait(int pid, int* status)
{
kill(-pid, SIGKILL);
kill(pid, SIGKILL);
for (int i = 0; i < 100; i++) {
if (waitpid(-1, status, WNOHANG | __WALL) == pid)
return;
usleep(1000);
}
DIR* dir = opendir("/sys/fs/fuse/connections");
if (dir) {
for (;;) {
struct dirent* ent = readdir(dir);
if (!ent)
break;
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
continue;
char abort[300];
snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort",
ent->d_name);
int fd = open(abort, O_WRONLY);
if (fd == -1) {
continue;
}
if (write(fd, abort, 1) < 0) {
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
static void reset_loop()
{
char buf[64];
snprintf(buf, sizeof(buf), "/dev/loop%llu", procid);
int loopfd = open(buf, O_RDWR);
if (loopfd != -1) {
ioctl(loopfd, LOOP_CLR_FD, 0);
close(loopfd);
}
}
static void setup_test()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
write_file("/proc/self/oom_score_adj", "1000");
if (symlink("/dev/binderfs", "./binderfs")) {
}
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
static void loop(void)
{
int iter = 0;
for (;; iter++) {
char cwdbuf[32];
sprintf(cwdbuf, "./%d", iter);
if (mkdir(cwdbuf, 0777))
exit(1);
reset_loop();
int pid = fork();
if (pid < 0)
exit(1);
if (pid == 0) {
if (chdir(cwdbuf))
exit(1);
setup_test();
execute_one();
exit(0);
}
int status = 0;
uint64_t start = current_time_ms();
for (;;) {
sleep_ms(10);
if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
break;
if (current_time_ms() - start < 5000)
continue;
kill_and_wait(pid, &status);
break;
}
remove_dir(cwdbuf);
}
}
uint64_t r[1] = {0xffffffffffffffff};
void execute_one(void)
{
intptr_t res = 0;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// syz_mount_image$hfsplus arguments: [
// fs: ptr[in, buffer] {
// buffer: {68 66 73 70 6c 75 73 00} (length 0x8)
// }
// dir: ptr[in, buffer] {
// buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8)
// }
// flags: mount_flags = 0x1018818 (8 bytes)
// opts: ptr[in, fs_options[hfsplus_options]] {
// fs_options[hfsplus_options] {
// elems: array[fs_opt_elem[hfsplus_options]] {
// fs_opt_elem[hfsplus_options] {
// elem: union hfsplus_options {
// decompose: buffer: {64 65 63 6f 6d 70 6f 73 65} (length 0x9)
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[hfsplus_options] {
// elem: union hfsplus_options {
// umask: fs_opt["umask", fmt[oct, int32]] {
// name: buffer: {75 6d 61 73 6b} (length 0x5)
// eq: const = 0x3d (1 bytes)
// val: int32 = 0x5 (23 bytes)
// }
// }
// comma: const = 0x2c (1 bytes)
// }
// fs_opt_elem[hfsplus_options] {
// elem: union hfsplus_options {
// decompose: buffer: {64 65 63 6f 6d 70 6f 73 65} (length 0x9)
// }
// comma: const = 0x2c (1 bytes)
// }
// }
// common: array[fs_opt_elem[fs_options_common]] {
// }
// null: const = 0x0 (1 bytes)
// }
// }
// chdir: int8 = 0x1 (1 bytes)
// size: len = 0x5dd (8 bytes)
// img: ptr[in, buffer] {
// buffer: (compressed buffer with length 0x5dd)
// }
// ]
// returns fd_dir
memcpy((void*)0x200000000600, "hfsplus\000", 8);
memcpy((void*)0x200000000640, "./file0\000", 8);
memcpy((void*)0x200000000180, "decompose", 9);
*(uint8_t*)0x200000000189 = 0x2c;
memcpy((void*)0x20000000018a, "umask", 5);
*(uint8_t*)0x20000000018f = 0x3d;
sprintf((char*)0x200000000190, "%023llo", (long long)5);
*(uint8_t*)0x2000000001a7 = 0x2c;
memcpy((void*)0x2000000001a8, "decompose", 9);
*(uint8_t*)0x2000000001b1 = 0x2c;
*(uint8_t*)0x2000000001b2 = 0;
memcpy((void*)0x200000000cc0,
"\x78\x9c\xec\xdd\x41\x6f\x1c\x67\x19\x07\xf0\xff\xac\xd7\x8e\x1d\x24\xd7\x6d\x93\x26\x40\x24\x9c\x22\x01\xc2\x22\xf1\xda\x94\x16\x7a\xc0\xa0\xa8\xf2\xa1\x42\x95\xe0\x0b\x58\xc4\x69\xac\x6c\xd2\xca\xde\x22\xb7\x07\x64\x50\x4e\xfd\x04\x3d\x96\x83\xcf\xad\xf8\x04\x3d\xe4\x0c\x1f\xc1\x12\xc7\x48\x48\x1c\x2d\x2e\xa9\x66\x76\x76\xbd\x4d\x1c\xc7\xdb\xda\xde\x4d\xfb\xfb\x25\xef\xce\xfb\xee\x3b\xf3\xcc\x33\xcf\xce\x8c\xbd\x9b\x48\x1b\xe0\x3b\x6b\x75\x21\xcd\x9d\x14\x59\x5d\x78\x7b\xbb\x1c\xef\xed\x2e\xb7\xf7\x76\x97\xef\xf6\xfa\x49\xce\x25\x69\x54\x7f\xd3\x2c\xbb\xff\x49\x26\xee\x27\xf3\xe9\xb6\x7c\x3f\x49\x51\x87\x2b\x9e\xb6\x9f\x4f\x1e\xbe\xf9\xd9\xea\xc7\x57\x3f\xef\x8e\x1a\x75\xab\xd6\x9f\x38\x6a\xbb\xe3\xd9\xa9\x5b\x56\xea\x24\x57\x4e\x30\xde\x83\x6f\x1c\xaf\xe8\x1f\x61\x19\xf4\x46\x2f\xf8\x38\x78\xf4\x6c\xff\x3b\xc5\xdd\x4f\x9c\x62\x6c\x86\x50\x3c\xe5\xb5\x98\x4b\xce\x27\x99\xae\xef\x03\xbd\x13\xb7\x71\xb6\xd9\x9d\xbc\xb1\xb9\x00\x01\x00\x00\x60\x48\xd3\x43\xac\xfb\xc2\x7e\xf6\xb3\x9d\xd9\x53\x4c\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x75\xea\xef\xff\x2f\xea\xd6\xe8\xf5\xe7\x53\xf4\xbe\xff\x7f\xaa\x7e\x2e\x75\xff\xb9\xf6\xc5\xa8\x13\x00\x00\x00\x00\x00\x00\x00\x80\x13\xf0\xa3\xfd\xec\x67\x3b\xb3\xc9\x5b\xd5\xf8\x51\x51\xfd\x9b\xff\xab\xd5\xe0\x42\xf5\xf8\xbd\x7c\x90\xad\xac\x67\x33\xd7\xb2\x9d\xb5\x74\xd2\xc9\x66\x5a\x49\xe6\x06\x02\x4d\x6d\xaf\x75\x3a\x9b\xad\x63\x6c\xb9\x74\xe8\x96\x4b\x67\x76\xc8\x00\x00\x00\x00\x00\x00\x00\xf0\x6d\xf4\xf7\xac\x66\x76\xd4\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xa0\x22\x99\xe8\x2e\xaa\x76\xa1\xd7\x9f\x4b\xa3\x99\x64\x3a\xc9\x54\xb9\xde\x4e\xf2\xef\x5e\xff\x79\xf6\xc5\xa8\x13\x00\x00\x00\x80\x33\xf0\xc2\x7e\xf6\xb3\x9d\xd9\xde\xf8\x51\x51\xbd\xe7\x7f\xa5\x7a\xdf\x3f\x9d\x0f\x72\x2f\x9d\x6c\xa4\x93\x76\xd6\x73\xb3\xfa\x2c\xa0\xfb\xae\xbf\xb1\xb7\xbb\xdc\xde\xdb\x5d\xbe\x5b\xb6\x27\xe3\xfe\xee\xbf\x43\xa5\x51\x45\x4c\xf7\xb3\x87\xc3\xf7\x7c\xb9\x5a\x63\x26\xb7\xb2\x51\x3d\x73\x2d\x7f\xce\x7b\x69\xe7\x66\x1a\xd5\x96\xa5\xcb\xbd\x7c\x0e\xcf\xeb\x6f\x65\x4e\xc5\x6f\x6b\xc7\xcc\xec\x66\xbd\x2c\x92\xe2\x87\xf5\xa7\x21\xe3\x61\xae\xaa\xc8\x64\xbf\x22\x8b\x75\x6e\x65\x35\x5e\x3c\xba\x12\x43\xbe\x3a\x8f\xef\xa9\x95\x46\xff\x93\x9f\x0b\xa7\x50\xf3\xf3\xf5\xb2\xac\xf9\xf4\x58\xd7\x7c\x69\xe0\xec\x7b\xe5\xe8\x4a\x24\x57\x2f\x5d\xf9\xd3\xed\xf6\xbd\x3b\xb7\x6f\x6d\x2d\x8c\xcf\x21\x7d\x4d\x8f\x57\x62\x79\xa0\x12\x97\xbe\x53\x95\x58\xac\x2a\x71\xb1\x3f\x5e\xcd\x5b\xf9\x63\x16\x32\x9f\x77\xb2\x99\x8d\xfc\x25\x6b\xe9\x64\x3d\xf3\xb9\x51\xf5\xd6\xea\xf3\xb9\x7c\x9c\x3b\xba\x52\x2b\x5f\x19\xbd\xf3\xac\x4c\xa6\xea\xd7\xa5\x7b\x17\x1d\x2e\xa7\x57\xab\x6d\x67\xb3\x91\x3f\xe4\xbd\xdc\xcc\x7a\x5e\xab\xfe\xb4\xf2\xab\x2c\xe5\xf5\x2c\xe6\x8d\x81\x57\xf8\xe2\x31\xae\xfa\xc6\x70\x57\xfd\x8f\x7f\x56\x77\x5e\x4a\x8a\x99\xee\x72\x4c\x94\x75\x7d\x71\xa0\xae\x83\xf7\xdc\xb9\x6a\x6e\xf0\x99\x83\x2a\xbd\x74\xf2\xf7\xc6\xe6\x0f\xea\xce\x44\x52\x34\xfb\x39\x8d\x83\xc7\x2b\xd1\x1a\xa8\xc4\xcb\x47\x57\xe2\x1f\x8f\xca\xc7\xad\xf6\xbd\x3b\x9b\xb7\xd7\xde\x9f\x3c\xde\xfe\x7e\x5a\x2f\xcb\x9f\x12\xe7\xc6\xea\xa7\xc4\x54\x7d\xf6\x36\xab\xd1\x57\xcf\x8e\x72\xee\xe5\x43\xe7\x5a\xd5\xdc\x85\xfe\x5c\xe3\x89\xb9\x8b\xfd\xb9\x67\x5d\xa9\x53\xf5\xef\x70\x4f\x46\x5a\xaa\xe6\x2e\x1d\x3a\xb7\x5c\xcd\x5d\x1e\x98\x3b\xec\xf7\x2d\x00\xc6\xde\xf9\x9f\x9f\x9f\x9a\x79\x38\xf3\xaf\x99\x4f\x67\xee\xcf\xdc\x9e\x79\x7b\xfa\xf7\xe7\xde\x38\x77\x65\x2a\x93\x0f\x26\x7f\xd3\x5c\x9c\xf8\x49\xe3\x4a\xf1\xcf\x7c\x9a\xbf\x1e\xbc\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\xbe\xad\x0f\x3f\xba\xb3\xd6\x6e\xaf\x6f\xea\x1c\xd1\x99\x4c\x32\x06\x69\xe8\xe8\x9c\x59\x67\xd4\x77\x26\xce\xc2\xf5\xce\xdd\xf7\xaf\x6f\x7d\xf8\xd1\x2f\x36\xee\xae\xbd\xbb\xfe\xee\xfa\xbd\xe5\x5f\xbf\xd6\x6a\x2d\xb6\x96\x7e\xf9\xfa\xf5\x5b\x1b\xed\xf5\xc5\xee\xe3\xa8\xd3\xe4\x94\x1c\x5c\xf4\xa3\xce\x04\x00\x00\x00\x00\x00\x00\x00\x00\x80\x61\x9c\xc5\x7f\x27\x1d\xf5\x31\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xfc\x58\x5d\x48\x73\x27\x45\x5a\x8b\xd7\x16\xcb\xf1\xde\xee\x72\xbb\x6c\xbd\xfe\xc1\x9a\x8d\x24\xcd\x72\xf9\xff\x64\xe2\x7e\x32\x9f\x6e\xcb\xdc\x40\xb8\xe2\x69\xfb\xf9\xe4\xe1\x9b\x9f\xad\x7e\x7c\xf5\xf3\x83\x58\x8d\xde\xfa\x13\x47\x6d\x77\x3c\x3b\x75\xcb\x4a\x9d\xe4\xca\x09\xc6\x7b\xf0\x8d\xe3\x15\xfd\x23\x2c\x83\xde\xe8\x05\x87\x51\xfb\x32\x00\x00\xff\xff\x14\x29\x1b\x67",
1501);
syz_mount_image(/*fs=*/0x200000000600, /*dir=*/0x200000000640,
/*flags=MS_POSIXACL|MS_SYNCHRONOUS|MS_STRICTATIME|MS_SILENT|MS_NOEXEC|0x800*/0x1018818,
/*opts=*/0x200000000180, /*chdir=*/1, /*size=*/0x5dd,
/*img=*/0x200000000cc0);
// openat$fuse arguments: [
// fd: const = 0xffffffffffffff9c (8 bytes)
// file: ptr[in, buffer] {
// buffer: {2f 64 65 76 2f 66 75 73 65 00} (length 0xa)
// }
// flags: const = 0x2 (4 bytes)
// mode: const = 0x0 (2 bytes)
// ]
// returns fd_fuse
memcpy((void*)0x200000002080, "/dev/fuse\000", 10);
res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul,
/*file=*/0x200000002080ul, /*flags=*/2, /*mode=*/0);
if (res != -1)
r[0] = res;
// mount$fuse arguments: [
// src: const = 0x0 (8 bytes)
// dst: ptr[in, buffer] {
// buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8)
// }
// type: ptr[in, buffer] {
// buffer: {66 75 73 65 00} (length 0x5)
// }
// flags: mount_flags = 0x0 (8 bytes)
// opts: ptr[in, fuse_options] {
// fuse_options {
// fd: fs_opt["fd", fmt[hex, fd_fuse]] {
// name: buffer: {66 64} (length 0x2)
// eq: const = 0x3d (1 bytes)
// val: fd_fuse (resource)
// }
// comma0: const = 0x2c (1 bytes)
// rootmode: fs_opt["rootmode", fmt[oct, flags[fuse_mode]]] {
// name: buffer: {72 6f 6f 74 6d 6f 64 65} (length 0x8)
// eq: const = 0x3d (1 bytes)
// val: fuse_mode = 0x4000 (23 bytes)
// }
// comma1: const = 0x2c (1 bytes)
// user_id: fs_opt["user_id", fmt[dec, uid]] {
// name: buffer: {75 73 65 72 5f 69 64} (length 0x7)
// eq: const = 0x3d (1 bytes)
// val: uid (resource)
// }
// comma2: const = 0x2c (1 bytes)
// group_id: fs_opt["group_id", fmt[dec, gid]] {
// name: buffer: {67 72 6f 75 70 5f 69 64} (length 0x8)
// eq: const = 0x3d (1 bytes)
// val: gid (resource)
// }
// comma3: const = 0x2c (1 bytes)
// opts: fs_options[fuse_opts] {
// elems: array[fs_opt_elem[fuse_opts]] {
// }
// common: array[fs_opt_elem[fs_options_common]] {
// }
// null: const = 0x0 (1 bytes)
// }
// }
// }
// ]
memcpy((void*)0x2000000020c0, "./file0\000", 8);
memcpy((void*)0x200000002100, "fuse\000", 5);
memcpy((void*)0x200000002140, "fd", 2);
*(uint8_t*)0x200000002142 = 0x3d;
sprintf((char*)0x200000002143, "0x%016llx", (long long)r[0]);
*(uint8_t*)0x200000002155 = 0x2c;
memcpy((void*)0x200000002156, "rootmode", 8);
*(uint8_t*)0x20000000215e = 0x3d;
sprintf((char*)0x20000000215f, "%023llo", (long long)0x4000);
*(uint8_t*)0x200000002176 = 0x2c;
memcpy((void*)0x200000002177, "user_id", 7);
*(uint8_t*)0x20000000217e = 0x3d;
sprintf((char*)0x20000000217f, "%020llu", (long long)0);
*(uint8_t*)0x200000002193 = 0x2c;
memcpy((void*)0x200000002194, "group_id", 8);
*(uint8_t*)0x20000000219c = 0x3d;
sprintf((char*)0x20000000219d, "%020llu", (long long)0);
*(uint8_t*)0x2000000021b1 = 0x2c;
*(uint8_t*)0x2000000021b2 = 0;
syscall(__NR_mount, /*src=*/0ul, /*dst=*/0x2000000020c0ul,
/*type=*/0x200000002100ul, /*flags=*/0ul, /*opts=*/0x200000002140ul);
}
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul,
/*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul,
/*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul,
/*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul,
/*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul,
/*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul,
/*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul,
/*fd=*/(intptr_t)-1, /*offset=*/0ul);
const char* reason;
(void)reason;
for (procid = 0; procid < 4; procid++) {
if (fork() == 0) {
use_temporary_dir();
loop();
}
}
sleep(1000000);
return 0;
}