Messages in this thread | | | From | Dipanjan Das <> | Date | Fri, 22 Jul 2022 08:44:43 -0700 | Subject | INFO: task hung in __bread_gfp |
| |
Hi,
We would like to report the following bug which has been found by our modified version of syzkaller.
====================================================== description: INFO: task hung in __bread_gfp affected file: kernel/sched/core.c kernel version: 5.19-rc6 kernel commit: 32346491ddf24599decca06190ebca03ff9de7f8 git tree: upstream kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=cd73026ceaed1402 crash reproducer: attached ====================================================== Crash log: ====================================================== INFO: task syz-executor.1:16085 blocked for more than 143 seconds. Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.1 state:D stack:27656 pid:16085 ppid: 6715 flags:0x00004004 Call Trace: <TASK> context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa76/0x5140 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 io_schedule+0x17/0x70 kernel/sched/core.c:8645 bit_wait_io+0x12/0xd0 kernel/sched/wait_bit.c:209 __wait_on_bit+0x60/0x190 kernel/sched/wait_bit.c:49 out_of_line_wait_on_bit+0xd5/0x110 kernel/sched/wait_bit.c:64 wait_on_bit_io include/linux/wait_bit.h:101 [inline] __wait_on_buffer fs/buffer.c:122 [inline] wait_on_buffer include/linux/buffer_head.h:355 [inline] __bread_slow fs/buffer.c:1178 [inline] __bread_gfp+0x2b8/0x370 fs/buffer.c:1381 sb_bread include/linux/buffer_head.h:302 [inline] befs_fill_super+0x7f4/0x10d0 fs/befs/linuxvfs.c:856 mount_bdev+0x34d/0x410 fs/super.c:1367 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1497 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1228/0x1cb0 fs/namespace.c:3370 do_mount+0xf3/0x110 fs/namespace.c:3383 __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x18f/0x230 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f0ade28d4ed RSP: 002b:00007f0adf332be8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f0ade3abf60 RCX: 00007f0ade28d4ed RDX: 0000000020000000 RSI: 0000000020000040 RDI: 0000000020000140 RBP: 00007f0ade2f92e1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000010 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffd73a61ff R14: 00007f0ade3abf60 R15: 00007f0adf332d80 </TASK> INFO: task syz-executor.0:16102 blocked for more than 143 seconds. Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:28120 pid:16102 ppid: 6710 flags:0x00000004 Call Trace: <TASK> context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa76/0x5140 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 blk_mq_freeze_queue_wait+0x112/0x160 block/blk-mq.c:180 nbd_add_socket+0x102/0x7c0 drivers/block/nbd.c:1122 __nbd_ioctl drivers/block/nbd.c:1463 [inline] nbd_ioctl+0x392/0x970 drivers/block/nbd.c:1520 blkdev_ioctl+0x36e/0x800 block/ioctl.c:614 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fc55a08d4ed RSP: 002b:00007fc558811be8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc55a1abf60 RCX: 00007fc55a08d4ed RDX: 0000000000000006 RSI: 000000000000ab00 RDI: 0000000000000005 RBP: 00007fc55a0f92e1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd96314b6f R14: 00007fc55a1abf60 R15: 00007fc558811d80 </TASK> INFO: task syz-executor.0:16105 blocked for more than 143 seconds. Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:28120 pid:16105 ppid: 6710 flags:0x00000004 Call Trace: <TASK> context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa76/0x5140 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6589 __mutex_lock_common kernel/locking/mutex.c:679 [inline] __mutex_lock+0xfa9/0x1f50 kernel/locking/mutex.c:747 nbd_ioctl+0x155/0x970 drivers/block/nbd.c:1513 blkdev_ioctl+0x36e/0x800 block/ioctl.c:614 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fc55a08d4ed RSP: 002b:00007fc5587cfbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc55a1ac120 RCX: 00007fc55a08d4ed RDX: ffffffffffffffff RSI: 000000000000ab00 RDI: 0000000000000008 RBP: 00007fc55a0f92e1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd96314b6f R14: 00007fc55a1ac120 R15: 00007fc5587cfd80 </TASK>
Showing all locks held in the system: 1 lock held by khungtaskd/27: #0: ffffffff8bd83aa0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6491 1 lock held by in:imklog/6665: #0: ffff88810093e368 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe3/0x100 fs/file.c:1036 1 lock held by syz-executor.1/16085: #0: ffff88817ae360e0 (&type->s_umount_key#51/1){+.+.}-{3:3}, at: alloc_super+0x1dd/0xa80 fs/super.c:228 1 lock held by syz-executor.0/16102: #0: ffff8881140ff998 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x155/0x970 drivers/block/nbd.c:1513 1 lock held by syz-executor.0/16105: #0: ffff8881140ff998 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x155/0x970 drivers/block/nbd.c:1513
=============================================
NMI backtrace for cpu 0 CPU: 0 PID: 27 Comm: khungtaskd Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111 nmi_trigger_cpumask_backtrace+0x1a1/0x1e0 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline] watchdog+0xcc8/0x1010 kernel/hung_task.c:369 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 </TASK> Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 7802 Comm: systemd-journal Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:check_kcov_mode+0x2e/0x40 kernel/kcov.c:177 Code: 9e 87 7e 89 c2 81 e2 00 01 00 00 a9 00 01 ff 00 74 10 31 c0 85 d2 74 15 8b 96 a4 15 00 00 85 d2 74 0b 8b 86 80 15 00 00 39 f8 <0f> 94 c0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 31 c0 65 8b RSP: 0018:ffffc9001c2c7928 EFLAGS: 00000293 RAX: 0000000000000000 RBX: ffffc9001c2c7cf0 RCX: ffff8881a7ddbb00 RDX: 0000000000000000 RSI: ffff8881a7ddbb00 RDI: 0000000000000002 RBP: 0000000000000001 R08: ffffffff81dd256c R09: 0000000000000000 R10: 0000000000000007 R11: 000000000008a07a R12: 000000000000000c R13: ffff888117d73068 R14: ffff888117d70bc0 R15: dffffc0000000000 FS: 00007f1e3485e8c0(0000) GS:ffff8881f5f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1e2eb03000 CR3: 0000000134fca000 CR4: 0000000000150ee0 Call Trace: <TASK> __sanitizer_cov_trace_pc+0x1a/0x40 kernel/kcov.c:200 __seqprop_spinlock_sequence include/linux/seqlock.h:275 [inline] __d_lookup_rcu+0x18c/0x740 fs/dcache.c:2345 lookup_fast+0xe1/0x6d0 fs/namei.c:1624 walk_component+0xcf/0x6a0 fs/namei.c:2010 link_path_walk.part.0+0x787/0xeb0 fs/namei.c:2341 link_path_walk fs/namei.c:2264 [inline] path_lookupat.isra.0+0x99/0x580 fs/namei.c:2492 filename_lookup+0x1ca/0x410 fs/namei.c:2522 user_path_at_empty+0x42/0x60 fs/namei.c:2895 user_path_at include/linux/namei.h:57 [inline] do_faccessat+0x127/0x850 fs/open.c:446 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f1e332db9c7 Code: 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d c8 d4 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 b8 15 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 d4 2b 00 f7 d8 64 89 01 48 RSP: 002b:00007fffb696cbc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00007fffb696fae0 RCX: 00007f1e332db9c7 RDX: 00007f1e34360a00 RSI: 0000000000000000 RDI: 000055b8fd7d89a3 RBP: 00007fffb696cc00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000069 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fffb696fae0 R15: 00007fffb696d0f0 </TASK> ---------------- Code disassembly (best guess): 0: 9e sahf 1: 87 7e 89 xchg %edi,-0x77(%rsi) 4: c2 81 e2 retq $0xe281 7: 00 01 add %al,(%rcx) 9: 00 00 add %al,(%rax) b: a9 00 01 ff 00 test $0xff0100,%eax 10: 74 10 je 0x22 12: 31 c0 xor %eax,%eax 14: 85 d2 test %edx,%edx 16: 74 15 je 0x2d 18: 8b 96 a4 15 00 00 mov 0x15a4(%rsi),%edx 1e: 85 d2 test %edx,%edx 20: 74 0b je 0x2d 22: 8b 86 80 15 00 00 mov 0x1580(%rsi),%eax 28: 39 f8 cmp %edi,%eax * 2a: 0f 94 c0 sete %al <-- trapping instruction 2d: c3 retq 2e: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) 35: 00 00 00 00 39: 0f 1f 00 nopl (%rax) 3c: 31 c0 xor %eax,%eax 3e: 65 gs 3f: 8b .byte 0x8b
-- Thanks and Regards,
Dipanjan // 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/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 __thread int clone_ongoing; static __thread int skip_segv; static __thread jmp_buf segv_env;
static void segv_handler(int sig, siginfo_t* info, void* ctx) { if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { exit(sig); } uintptr_t addr = (uintptr_t)info->si_addr; const uintptr_t prog_start = 1 << 20; const uintptr_t prog_end = 100 << 20; int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; int valid = addr < prog_start || addr > prog_end; if (skip && valid) { _longjmp(segv_env, 1); } exit(sig); }
static void install_segv_handler(void) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_IGN; syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8); syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8); memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = segv_handler; sa.sa_flags = SA_NODEFER | SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGBUS, &sa, NULL); }
#define NONFAILING(...) ({ int ok = 1; __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); if (_setjmp(segv_env) == 0) { __VA_ARGS__; } else ok = 0; __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); ok; })
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 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; }
static long syz_open_dev(volatile long a0, volatile long a1, volatile long a2) { if (a0 == 0xc || a0 == 0xb) { char buf[128]; sprintf(buf, "/dev/%s/%d:%d", a0 == 0xc ? "char" : "block", (uint8_t)a1, (uint8_t)a2); return open(buf, O_RDWR, 0); } else { char buf[1024]; char* hash; strncpy(buf, (char*)a0, sizeof(buf) - 1); buf[sizeof(buf) - 1] = 0; while ((hash = strchr(buf, '#'))) { *hash = '0' + (char)(a1 % 10); a1 /= 10; } return open(buf, a2, 0); } }
struct fs_image_segment { void* data; uintptr_t size; uintptr_t offset; };
#define IMAGE_MAX_SEGMENTS 4096 #define IMAGE_MAX_SIZE (129 << 20)
static unsigned long fs_image_segment_check(unsigned long size, unsigned long nsegs, struct fs_image_segment* segs) { if (nsegs > IMAGE_MAX_SEGMENTS) nsegs = IMAGE_MAX_SEGMENTS; for (size_t i = 0; i < nsegs; i++) { if (segs[i].size > IMAGE_MAX_SIZE) segs[i].size = IMAGE_MAX_SIZE; segs[i].offset %= IMAGE_MAX_SIZE; if (segs[i].offset > IMAGE_MAX_SIZE - segs[i].size) segs[i].offset = IMAGE_MAX_SIZE - segs[i].size; if (size < segs[i].offset + segs[i].offset) size = segs[i].offset + segs[i].offset; } if (size > IMAGE_MAX_SIZE) size = IMAGE_MAX_SIZE; return size; } static int setup_loop_device(long unsigned size, long unsigned nsegs, struct fs_image_segment* segs, const char* loopname, int* memfd_p, int* loopfd_p) { int err = 0, loopfd = -1; size = fs_image_segment_check(size, nsegs, segs); int memfd = syscall(__NR_memfd_create, "syzkaller", 0); if (memfd == -1) { err = errno; goto error; } if (ftruncate(memfd, size)) { err = errno; goto error_close_memfd; } for (size_t i = 0; i < nsegs; i++) { if (pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset) < 0) { } } 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; } } *memfd_p = memfd; *loopfd_p = loopfd; return 0;
error_close_loop: close(loopfd); error_close_memfd: close(memfd); error: errno = err; return -1; }
static long syz_mount_image(volatile long fsarg, volatile long dir, volatile unsigned long size, volatile unsigned long nsegs, volatile long segments, volatile long flags, volatile long optsarg) { struct fs_image_segment* segs = (struct fs_image_segment*)segments; int res = -1, err = 0, loopfd = -1, memfd = -1, need_loop_device = !!segs; char* mount_opts = (char*)optsarg; char* target = (char*)dir; char* fs = (char*)fsarg; char* source = NULL; char loopname[64]; if (need_loop_device) { memset(loopname, 0, sizeof(loopname)); snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); if (setup_loop_device(size, nsegs, segs, loopname, &memfd, &loopfd) == -1) return -1; 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) { if (strstr(opts, "errors=panic") || strstr(opts, "errors=remount-ro") == 0) strcat(opts, ",errors=continue"); } else if (strcmp(fs, "xfs") == 0) { strcat(opts, ",nouuid"); } 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; }
error_clear_loop: if (need_loop_device) { ioctl(loopfd, LOOP_CLR_FD, 0); close(loopfd); close(memfd); } errno = err; return res; }
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"); }
static void execute_one(void);
#define WAIT_FLAGS __WALL
static void loop(void) { int iter = 0; for (;; iter++) { reset_loop(); int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) continue; kill_and_wait(pid, &status); break; } } }
uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff};
void execute_one(void) { intptr_t res = 0; NONFAILING(memcpy((void*)0x20000080, "/dev/nbd#\000", 10)); res = -1; NONFAILING(res = syz_open_dev(0x20000080, 0, 0)); if (res != -1) r[0] = res; res = syscall(__NR_socketpair, 1ul, 1ul, 0, 0x20000000ul); if (res != -1) NONFAILING(r[1] = *(uint32_t*)0x20000000); syscall(__NR_ioctl, r[0], 0xab00, r[1]); NONFAILING(memcpy((void*)0x200000c0, "./file0\000", 8)); NONFAILING(syz_mount_image(0, 0x200000c0, 0, 0, 0, 0, 0)); NONFAILING(memcpy((void*)0x20000140, "\x2f\x64\x65\x76\x2f\x6e\x62\x64\x30\x00\xf5\x23\xc5\x8e\x4f\x2a\x33\x09\x7c\xd7\x27\x8a\xe3\x76\xd1\x66\x7b\x76\xbe\x83\x00\x10\xba\x30\x56\x36\x6c\x54\x80\x11\x75\xbf\x6c\xc8\x8e\xee\xea\x63\x4c\x2a\x05\x13\x98\x9f\xc3\xaa\x1e\xc8\x85\x65\xb6\xb4\xb4\x17\x9b\xc7\xbb\xf6\x1e\x85\xf9\x34\x0e\xf7\x36\x0c\x02\x00\x92\x65\x1d\x99\x5f\x8f\x60\xf0\x27\xf1\xed\x41\xeb\xcc\x84\xae\x40\xaa\x0f\x56\x66\x1e\xd3\xa9\x82\x77\xc4\x9e\xd3\x00\x00\x00\x60\x00\x0c\x9c\xf7\xff\x7f\x00\x00\x54\xaa\x00\x00\x00\x00", 125)); NONFAILING(memcpy((void*)0x20000040, "./file0\000", 8)); NONFAILING(memcpy((void*)0x20000000, "befs\000", 5)); syscall(__NR_mount, 0x20000140ul, 0x20000040ul, 0x20000000ul, 0x10ul, 0ul);
} int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); install_segv_handler(); loop(); return 0; } [unhandled content-type:application/octet-stream] | |