Tang-ZW

Untitled

Mar 9th, 2026
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.28 KB | None | 0 0
  1. #define _GNU_SOURCE
  2.  
  3. #include <endian.h>
  4. #include <errno.h>
  5. #include <fcntl.h>
  6. #include <setjmp.h>
  7. #include <stdbool.h>
  8. #include <stddef.h>
  9. #include <stdint.h>
  10. #include <stdio.h>
  11. #include <stdlib.h>
  12. #include <string.h>
  13. #include <sys/ioctl.h>
  14. #include <sys/mman.h>
  15. #include <sys/mount.h>
  16. #include <sys/stat.h>
  17. #include <sys/syscall.h>
  18. #include <sys/types.h>
  19. #include <unistd.h>
  20.  
  21. #include <linux/loop.h>
  22.  
  23. #ifndef __NR_memfd_create
  24. #define __NR_memfd_create 319
  25. #endif
  26.  
  27. static unsigned long long procid;
  28.  
  29. //% This code is derived from puff.{c,h}, found in the zlib development. The
  30. //% original files come with the following copyright notice:
  31.  
  32. //% Copyright (C) 2002-2013 Mark Adler, all rights reserved
  33. //% version 2.3, 21 Jan 2013
  34. //% This software is provided 'as-is', without any express or implied
  35. //% warranty. In no event will the author be held liable for any damages
  36. //% arising from the use of this software.
  37. //% Permission is granted to anyone to use this software for any purpose,
  38. //% including commercial applications, and to alter it and redistribute it
  39. //% freely, subject to the following restrictions:
  40. //% 1. The origin of this software must not be misrepresented; you must not
  41. //% claim that you wrote the original software. If you use this software
  42. //% in a product, an acknowledgment in the product documentation would be
  43. //% appreciated but is not required.
  44. //% 2. Altered source versions must be plainly marked as such, and must not be
  45. //% misrepresented as being the original software.
  46. //% 3. This notice may not be removed or altered from any source distribution.
  47. //% Mark Adler [email protected]
  48.  
  49. //% BEGIN CODE DERIVED FROM puff.{c,h}
  50.  
  51. #define MAXBITS 15
  52. #define MAXLCODES 286
  53. #define MAXDCODES 30
  54. #define MAXCODES (MAXLCODES + MAXDCODES)
  55. #define FIXLCODES 288
  56.  
  57. struct puff_state {
  58. unsigned char* out;
  59. unsigned long outlen;
  60. unsigned long outcnt;
  61. const unsigned char* in;
  62. unsigned long inlen;
  63. unsigned long incnt;
  64. int bitbuf;
  65. int bitcnt;
  66. jmp_buf env;
  67. };
  68. static int puff_bits(struct puff_state* s, int need)
  69. {
  70. long val = s->bitbuf;
  71. while (s->bitcnt < need) {
  72. if (s->incnt == s->inlen)
  73. longjmp(s->env, 1);
  74. val |= (long)(s->in[s->incnt++]) << s->bitcnt;
  75. s->bitcnt += 8;
  76. }
  77. s->bitbuf = (int)(val >> need);
  78. s->bitcnt -= need;
  79. return (int)(val & ((1L << need) - 1));
  80. }
  81. static int puff_stored(struct puff_state* s)
  82. {
  83. s->bitbuf = 0;
  84. s->bitcnt = 0;
  85. if (s->incnt + 4 > s->inlen)
  86. return 2;
  87. unsigned len = s->in[s->incnt++];
  88. len |= s->in[s->incnt++] << 8;
  89. if (s->in[s->incnt++] != (~len & 0xff) ||
  90. s->in[s->incnt++] != ((~len >> 8) & 0xff))
  91. return -2;
  92. if (s->incnt + len > s->inlen)
  93. return 2;
  94. if (s->outcnt + len > s->outlen)
  95. return 1;
  96. for (; len--; s->outcnt++, s->incnt++) {
  97. if (s->in[s->incnt])
  98. s->out[s->outcnt] = s->in[s->incnt];
  99. }
  100. return 0;
  101. }
  102. struct puff_huffman {
  103. short* count;
  104. short* symbol;
  105. };
  106. static int puff_decode(struct puff_state* s, const struct puff_huffman* h)
  107. {
  108. int first = 0;
  109. int index = 0;
  110. int bitbuf = s->bitbuf;
  111. int left = s->bitcnt;
  112. int code = first = index = 0;
  113. int len = 1;
  114. short* next = h->count + 1;
  115. while (1) {
  116. while (left--) {
  117. code |= bitbuf & 1;
  118. bitbuf >>= 1;
  119. int count = *next++;
  120. if (code - count < first) {
  121. s->bitbuf = bitbuf;
  122. s->bitcnt = (s->bitcnt - len) & 7;
  123. return h->symbol[index + (code - first)];
  124. }
  125. index += count;
  126. first += count;
  127. first <<= 1;
  128. code <<= 1;
  129. len++;
  130. }
  131. left = (MAXBITS + 1) - len;
  132. if (left == 0)
  133. break;
  134. if (s->incnt == s->inlen)
  135. longjmp(s->env, 1);
  136. bitbuf = s->in[s->incnt++];
  137. if (left > 8)
  138. left = 8;
  139. }
  140. return -10;
  141. }
  142. static int puff_construct(struct puff_huffman* h, const short* length, int n)
  143. {
  144. int len;
  145. for (len = 0; len <= MAXBITS; len++)
  146. h->count[len] = 0;
  147. int symbol;
  148. for (symbol = 0; symbol < n; symbol++)
  149. (h->count[length[symbol]])++;
  150. if (h->count[0] == n)
  151. return 0;
  152. int left = 1;
  153. for (len = 1; len <= MAXBITS; len++) {
  154. left <<= 1;
  155. left -= h->count[len];
  156. if (left < 0)
  157. return left;
  158. }
  159. short offs[MAXBITS + 1];
  160. offs[1] = 0;
  161. for (len = 1; len < MAXBITS; len++)
  162. offs[len + 1] = offs[len] + h->count[len];
  163. for (symbol = 0; symbol < n; symbol++)
  164. if (length[symbol] != 0)
  165. h->symbol[offs[length[symbol]]++] = symbol;
  166. return left;
  167. }
  168. static int puff_codes(struct puff_state* s, const struct puff_huffman* lencode,
  169. const struct puff_huffman* distcode)
  170. {
  171. static const short lens[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13,
  172. 15, 17, 19, 23, 27, 31, 35, 43, 51, 59,
  173. 67, 83, 99, 115, 131, 163, 195, 227, 258};
  174. static const short lext[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2,
  175. 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
  176. static const short dists[30] = {
  177. 1, 2, 3, 4, 5, 7, 9, 13, 17, 25,
  178. 33, 49, 65, 97, 129, 193, 257, 385, 513, 769,
  179. 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577};
  180. static const short dext[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3,
  181. 4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
  182. 9, 9, 10, 10, 11, 11, 12, 12, 13, 13};
  183. int symbol;
  184. do {
  185. symbol = puff_decode(s, lencode);
  186. if (symbol < 0)
  187. return symbol;
  188. if (symbol < 256) {
  189. if (s->outcnt == s->outlen)
  190. return 1;
  191. if (symbol)
  192. s->out[s->outcnt] = symbol;
  193. s->outcnt++;
  194. } else if (symbol > 256) {
  195. symbol -= 257;
  196. if (symbol >= 29)
  197. return -10;
  198. int len = lens[symbol] + puff_bits(s, lext[symbol]);
  199. symbol = puff_decode(s, distcode);
  200. if (symbol < 0)
  201. return symbol;
  202. unsigned dist = dists[symbol] + puff_bits(s, dext[symbol]);
  203. if (dist > s->outcnt)
  204. return -11;
  205. if (s->outcnt + len > s->outlen)
  206. return 1;
  207. while (len--) {
  208. if (dist <= s->outcnt && s->out[s->outcnt - dist])
  209. s->out[s->outcnt] = s->out[s->outcnt - dist];
  210. s->outcnt++;
  211. }
  212. }
  213. } while (symbol != 256);
  214. return 0;
  215. }
  216. static int puff_fixed(struct puff_state* s)
  217. {
  218. static int virgin = 1;
  219. static short lencnt[MAXBITS + 1], lensym[FIXLCODES];
  220. static short distcnt[MAXBITS + 1], distsym[MAXDCODES];
  221. static struct puff_huffman lencode, distcode;
  222. if (virgin) {
  223. lencode.count = lencnt;
  224. lencode.symbol = lensym;
  225. distcode.count = distcnt;
  226. distcode.symbol = distsym;
  227. short lengths[FIXLCODES];
  228. int symbol;
  229. for (symbol = 0; symbol < 144; symbol++)
  230. lengths[symbol] = 8;
  231. for (; symbol < 256; symbol++)
  232. lengths[symbol] = 9;
  233. for (; symbol < 280; symbol++)
  234. lengths[symbol] = 7;
  235. for (; symbol < FIXLCODES; symbol++)
  236. lengths[symbol] = 8;
  237. puff_construct(&lencode, lengths, FIXLCODES);
  238. for (symbol = 0; symbol < MAXDCODES; symbol++)
  239. lengths[symbol] = 5;
  240. puff_construct(&distcode, lengths, MAXDCODES);
  241. virgin = 0;
  242. }
  243. return puff_codes(s, &lencode, &distcode);
  244. }
  245. static int puff_dynamic(struct puff_state* s)
  246. {
  247. static const short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5,
  248. 11, 4, 12, 3, 13, 2, 14, 1, 15};
  249. int nlen = puff_bits(s, 5) + 257;
  250. int ndist = puff_bits(s, 5) + 1;
  251. int ncode = puff_bits(s, 4) + 4;
  252. if (nlen > MAXLCODES || ndist > MAXDCODES)
  253. return -3;
  254. short lengths[MAXCODES];
  255. int index;
  256. for (index = 0; index < ncode; index++)
  257. lengths[order[index]] = puff_bits(s, 3);
  258. for (; index < 19; index++)
  259. lengths[order[index]] = 0;
  260. short lencnt[MAXBITS + 1], lensym[MAXLCODES];
  261. struct puff_huffman lencode = {lencnt, lensym};
  262. int err = puff_construct(&lencode, lengths, 19);
  263. if (err != 0)
  264. return -4;
  265. index = 0;
  266. while (index < nlen + ndist) {
  267. int symbol;
  268. int len;
  269. symbol = puff_decode(s, &lencode);
  270. if (symbol < 0)
  271. return symbol;
  272. if (symbol < 16)
  273. lengths[index++] = symbol;
  274. else {
  275. len = 0;
  276. if (symbol == 16) {
  277. if (index == 0)
  278. return -5;
  279. len = lengths[index - 1];
  280. symbol = 3 + puff_bits(s, 2);
  281. } else if (symbol == 17)
  282. symbol = 3 + puff_bits(s, 3);
  283. else
  284. symbol = 11 + puff_bits(s, 7);
  285. if (index + symbol > nlen + ndist)
  286. return -6;
  287. while (symbol--)
  288. lengths[index++] = len;
  289. }
  290. }
  291. if (lengths[256] == 0)
  292. return -9;
  293. err = puff_construct(&lencode, lengths, nlen);
  294. if (err && (err < 0 || nlen != lencode.count[0] + lencode.count[1]))
  295. return -7;
  296. short distcnt[MAXBITS + 1], distsym[MAXDCODES];
  297. struct puff_huffman distcode = {distcnt, distsym};
  298. err = puff_construct(&distcode, lengths + nlen, ndist);
  299. if (err && (err < 0 || ndist != distcode.count[0] + distcode.count[1]))
  300. return -8;
  301. return puff_codes(s, &lencode, &distcode);
  302. }
  303. static int puff(unsigned char* dest, unsigned long* destlen,
  304. const unsigned char* source, unsigned long sourcelen)
  305. {
  306. struct puff_state s = {
  307. .out = dest,
  308. .outlen = *destlen,
  309. .outcnt = 0,
  310. .in = source,
  311. .inlen = sourcelen,
  312. .incnt = 0,
  313. .bitbuf = 0,
  314. .bitcnt = 0,
  315. };
  316. int err;
  317. if (setjmp(s.env) != 0)
  318. err = 2;
  319. else {
  320. int last;
  321. do {
  322. last = puff_bits(&s, 1);
  323. int type = puff_bits(&s, 2);
  324. err = type == 0 ? puff_stored(&s)
  325. : (type == 1 ? puff_fixed(&s)
  326. : (type == 2 ? puff_dynamic(&s) : -1));
  327. if (err != 0)
  328. break;
  329. } while (!last);
  330. }
  331. *destlen = s.outcnt;
  332. return err;
  333. }
  334.  
  335. //% END CODE DERIVED FROM puff.{c,h}
  336.  
  337. #define ZLIB_HEADER_WIDTH 2
  338.  
  339. static int puff_zlib_to_file(const unsigned char* source,
  340. unsigned long sourcelen, int dest_fd)
  341. {
  342. if (sourcelen < ZLIB_HEADER_WIDTH)
  343. return 0;
  344. source += ZLIB_HEADER_WIDTH;
  345. sourcelen -= ZLIB_HEADER_WIDTH;
  346. const unsigned long max_destlen = 132 << 20;
  347. void* ret = mmap(0, max_destlen, PROT_WRITE | PROT_READ,
  348. MAP_PRIVATE | MAP_ANON, -1, 0);
  349. if (ret == MAP_FAILED)
  350. return -1;
  351. unsigned char* dest = (unsigned char*)ret;
  352. unsigned long destlen = max_destlen;
  353. int err = puff(dest, &destlen, source, sourcelen);
  354. if (err) {
  355. munmap(dest, max_destlen);
  356. errno = -err;
  357. return -1;
  358. }
  359. if (write(dest_fd, dest, destlen) != (ssize_t)destlen) {
  360. munmap(dest, max_destlen);
  361. return -1;
  362. }
  363. return munmap(dest, max_destlen);
  364. }
  365.  
  366. static int setup_loop_device(unsigned char* data, unsigned long size,
  367. const char* loopname, int* loopfd_p)
  368. {
  369. int err = 0, loopfd = -1;
  370. int memfd = syscall(__NR_memfd_create, "syzkaller", 0);
  371. if (memfd == -1) {
  372. err = errno;
  373. goto error;
  374. }
  375. if (puff_zlib_to_file(data, size, memfd)) {
  376. err = errno;
  377. goto error_close_memfd;
  378. }
  379. loopfd = open(loopname, O_RDWR);
  380. if (loopfd == -1) {
  381. err = errno;
  382. goto error_close_memfd;
  383. }
  384. if (ioctl(loopfd, LOOP_SET_FD, memfd)) {
  385. if (errno != EBUSY) {
  386. err = errno;
  387. goto error_close_loop;
  388. }
  389. ioctl(loopfd, LOOP_CLR_FD, 0);
  390. usleep(1000);
  391. if (ioctl(loopfd, LOOP_SET_FD, memfd)) {
  392. err = errno;
  393. goto error_close_loop;
  394. }
  395. }
  396. close(memfd);
  397. *loopfd_p = loopfd;
  398. return 0;
  399.  
  400. error_close_loop:
  401. close(loopfd);
  402. error_close_memfd:
  403. close(memfd);
  404. error:
  405. errno = err;
  406. return -1;
  407. }
  408.  
  409. static void reset_loop_device(const char* loopname)
  410. {
  411. int loopfd = open(loopname, O_RDWR);
  412. if (loopfd == -1) {
  413. return;
  414. }
  415. if (ioctl(loopfd, LOOP_CLR_FD, 0)) {
  416. }
  417. close(loopfd);
  418. }
  419.  
  420. static long syz_mount_image(volatile long fsarg, volatile long dir,
  421. volatile long flags, volatile long optsarg,
  422. volatile long change_dir,
  423. volatile unsigned long size, volatile long image)
  424. {
  425. unsigned char* data = (unsigned char*)image;
  426. int res = -1, err = 0, need_loop_device = !!size;
  427. char* mount_opts = (char*)optsarg;
  428. char* target = (char*)dir;
  429. char* fs = (char*)fsarg;
  430. char* source = NULL;
  431. char loopname[64];
  432. if (need_loop_device) {
  433. int loopfd;
  434. memset(loopname, 0, sizeof(loopname));
  435. snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid);
  436. if (setup_loop_device(data, size, loopname, &loopfd) == -1)
  437. return -1;
  438. close(loopfd);
  439. source = loopname;
  440. }
  441. mkdir(target, 0777);
  442. char opts[256];
  443. memset(opts, 0, sizeof(opts));
  444. if (strlen(mount_opts) > (sizeof(opts) - 32)) {
  445. }
  446. strncpy(opts, mount_opts, sizeof(opts) - 32);
  447. if (strcmp(fs, "iso9660") == 0) {
  448. flags |= MS_RDONLY;
  449. } else if (strncmp(fs, "ext", 3) == 0) {
  450. bool has_remount_ro = false;
  451. char* remount_ro_start = strstr(opts, "errors=remount-ro");
  452. if (remount_ro_start != NULL) {
  453. char after = *(remount_ro_start + strlen("errors=remount-ro"));
  454. char before = remount_ro_start == opts ? '\0' : *(remount_ro_start - 1);
  455. has_remount_ro = ((before == '\0' || before == ',') &&
  456. (after == '\0' || after == ','));
  457. }
  458. if (strstr(opts, "errors=panic") || !has_remount_ro)
  459. strcat(opts, ",errors=continue");
  460. } else if (strcmp(fs, "xfs") == 0) {
  461. strcat(opts, ",nouuid");
  462. } else if (strncmp(fs, "gfs2", 4) == 0 &&
  463. (strstr(opts, "errors=panic") || strstr(opts, "debug"))) {
  464. strcat(opts, ",errors=withdraw");
  465. }
  466. res = mount(source, target, fs, flags, opts);
  467. if (res == -1) {
  468. err = errno;
  469. goto error_clear_loop;
  470. }
  471. res = open(target, O_RDONLY | O_DIRECTORY);
  472. if (res == -1) {
  473. err = errno;
  474. goto error_clear_loop;
  475. }
  476. if (change_dir) {
  477. res = chdir(target);
  478. if (res == -1) {
  479. err = errno;
  480. }
  481. }
  482.  
  483. error_clear_loop:
  484. if (need_loop_device)
  485. reset_loop_device(loopname);
  486. errno = err;
  487. return res;
  488. }
  489.  
  490. uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff};
  491.  
  492. int main(void)
  493. {
  494. syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul,
  495. /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul,
  496. /*fd=*/(intptr_t)-1, /*offset=*/0ul);
  497. syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul,
  498. /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul,
  499. /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul,
  500. /*fd=*/(intptr_t)-1, /*offset=*/0ul);
  501. syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul,
  502. /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul,
  503. /*fd=*/(intptr_t)-1, /*offset=*/0ul);
  504. const char* reason;
  505. (void)reason;
  506. intptr_t res = 0;
  507. if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {
  508. }
  509. // syz_mount_image$ext4 arguments: [
  510. // fs: ptr[in, buffer] {
  511. // buffer: {65 78 74 34 00} (length 0x5)
  512. // }
  513. // dir: ptr[in, buffer] {
  514. // buffer: {2e 2f 66 69 6c 65 30 00} (length 0x8)
  515. // }
  516. // flags: mount_flags = 0x2000480 (8 bytes)
  517. // opts: ptr[in, fs_options[ext4_options]] {
  518. // fs_options[ext4_options] {
  519. // elems: array[fs_opt_elem[ext4_options]] {
  520. // }
  521. // common: array[fs_opt_elem[fs_options_common]] {
  522. // }
  523. // null: const = 0x0 (1 bytes)
  524. // }
  525. // }
  526. // chdir: int8 = 0x1 (1 bytes)
  527. // size: len = 0x75b (8 bytes)
  528. // img: ptr[in, buffer] {
  529. // buffer: (compressed buffer with length 0x75b)
  530. // }
  531. // ]
  532. // returns fd_dir
  533. memcpy((void*)0x200000001140, "ext4\000", 5);
  534. memcpy((void*)0x2000000007c0, "./file0\000", 8);
  535. *(uint8_t*)0x200000001180 = 0;
  536. memcpy(
  537. (void*)0x200000000840,
  538. "\x78\x9c\xec\xdd\xcd\x6b\x1c\xe5\x1f\x00\xf0\xef\x6c\x92\xa6\xbf\xb4\x3f"
  539. "\x13\x41\xd0\x7a\x0a\x08\x1a\x28\xdd\x98\x1a\x5b\x05\x0f\x15\x0f\x22\x58"
  540. "\x28\xe8\xd9\x76\xd9\x6c\x43\xcd\x6e\xb6\x64\x37\xa5\x09\x01\x2d\x22\x78"
  541. "\x11\x54\x3c\x08\x7a\xe9\xd9\x97\x7a\xf3\xea\xcb\x55\xff\x0b\x0f\xd2\x52"
  542. "\x35\x2d\x56\x3c\x48\x64\x36\xb3\xe9\xb6\xd9\x4d\x37\x6d\x92\x45\xf7\xf3"
  543. "\x81\xa7\x7d\x9e\x99\xd9\x3c\xf3\x9d\x67\x66\x9e\x67\x77\x86\x99\x00\xfa"
  544. "\xd6\x78\xfa\x4f\x2e\xe2\x50\x44\x7c\x90\x44\x8c\x66\xd3\x93\x88\x18\x6a"
  545. "\xe4\x06\x23\x4e\xac\x2f\x77\x6b\x75\xa5\x98\xa6\x24\xd6\xd6\x5e\xfb\x2d"
  546. "\x69\x2c\x73\x73\x75\xa5\x18\x2d\x9f\x49\x1d\xc8\x0a\x8f\x45\xc4\xf7\xef"
  547. "\x46\x1c\xce\x6d\xae\xb7\xb6\xb4\x3c\x57\x28\x97\x4b\x0b\x59\x79\xb2\x5e"
  548. "\x39\x3f\x59\x5b\x5a\x3e\x72\xae\x52\x98\x2d\xcd\x96\xe6\x8f\x4d\x4d\x4f"
  549. "\x1f\x3d\xfe\xec\xf1\x63\x3b\x17\xeb\x1f\x3f\x2d\x1f\xbc\xf6\xe1\xcb\x4f"
  550. "\x7d\x75\xe2\xaf\x77\x1e\xbd\xf2\xfe\x0f\x49\x9c\x88\x83\xd9\xbc\xd6\x38"
  551. "\x76\xca\x78\x8c\x67\xdb\x64\x28\xdd\x84\x77\x78\x69\xa7\x2b\xeb\xb1\xa4"
  552. "\xd7\x2b\xc0\x7d\x49\x0f\xcd\x81\xf5\xa3\x3c\x0e\xc5\x68\x0c\x34\x72\x00"
  553. "\xc0\x7f\xd9\x5b\x11\xb1\x06\x00\xf4\x99\x44\xff\x0f\x00\x7d\xa6\xf9\x3b"
  554. "\xc0\xcd\xd5\x95\x62\x33\xf5\xf6\x17\x89\xbd\x75\xfd\xc5\x88\xd8\xbf\x1e"
  555. "\x7f\xf3\xfa\xe6\xfa\x9c\xc1\xec\x9a\xdd\xfe\xc6\x75\xd0\x91\x9b\xc9\x1d"
  556. "\x57\x46\x92\x88\x18\xdb\x81\xfa\xc7\x23\xe2\xb3\x6f\xde\xf8\x22\x4d\xb1"
  557. "\x4b\xd7\x21\x01\xda\x79\xfb\x52\x44\x9c\x19\x1b\xdf\x7c\xfe\x4f\x36\xdd"
  558. "\xb3\xb0\x5d\x4f\x77\xb1\xcc\xf8\x5d\x65\xe7\x3f\xd8\x3b\xdf\xa6\xe3\x9f"
  559. "\xe7\xda\x8d\xff\x72\x1b\xe3\x9f\x68\x33\xfe\x19\x6e\x73\xec\xde\x8f\x7b"
  560. "\x1f\xff\xb9\xab\x3b\x50\x4d\x47\xe9\xf8\xef\x85\x96\x7b\xdb\x6e\xb5\xc4"
  561. "\x9f\x19\x1b\xc8\x4a\xff\x6f\x8c\xf9\x86\x92\xb3\xe7\xca\xa5\xf4\xdc\xf6"
  562. "\x50\x44\x4c\xc4\xd0\x70\x5a\x9e\xda\xa2\x8e\x89\x1b\x7f\xdf\xe8\x34\xaf"
  563. "\x75\xfc\xf7\xfb\x47\x6f\x7e\x9e\xd6\x9f\xfe\x7f\x7b\x89\xdc\xd5\xc1\xe1"
  564. "\x3b\x3f\x33\x53\xa8\x17\x1e\x24\xe6\x56\xd7\x2f\x45\x3c\x3e\xd8\x2e\xfe"
  565. "\x64\xa3\xfd\x93\x0e\xe3\xdf\x53\x5d\xd6\xf1\xca\xf3\xef\x7d\xda\x69\x5e"
  566. "\x1a\x7f\x1a\x6f\x33\x6d\x8e\x7f\x77\xad\x5d\x8e\x78\xb2\x6d\xfb\xdf\xbe"
  567. "\xa3\x2d\xd9\xf2\xfe\xc4\xc9\xc6\xee\x30\xd9\xdc\x29\xda\xf8\xfa\xe7\x4f"
  568. "\x46\x3a\xd5\xdf\xda\xfe\x69\x4a\xeb\x6f\x7e\x17\xd8\x0b\x69\xfb\x8f\x6c"
  569. "\x1d\xff\x58\xd2\x7a\xbf\x66\x6d\xfb\x75\xfc\x78\x79\xf4\xbb\x4e\xf3\xee"
  570. "\x1d\x7f\xfb\xfd\x7f\x5f\xf2\x7a\x23\xbf\x2f\x9b\x76\xb1\x50\xaf\x2f\x4c"
  571. "\x45\xec\x4b\x5e\xdd\x3c\xfd\xe8\xed\xcf\x36\xcb\xcd\xe5\xd3\xf8\x27\x9e"
  572. "\x68\x7f\xfc\x6f\xb5\xff\xa7\xdf\x09\xcf\x74\x19\xff\xe0\xb5\x5f\xbf\xbc"
  573. "\xff\xf8\x77\x57\x1a\xff\xcc\xb6\xda\x7f\xfb\x99\x2b\xb7\xe6\x06\x3a\xd5"
  574. "\xdf\x5d\xfb\x4f\x37\x72\x13\xd9\x94\x6e\xce\x7f\xdd\xae\xe0\x83\x6c\x3b"
  575. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  576. "\x00\xe8\x56\x2e\x22\x0e\x46\x92\xcb\x6f\xe4\x73\xb9\x7c\x7e\xfd\x1d\xde"
  577. "\x8f\xc4\x48\xae\x5c\xad\xd5\x0f\x9f\xad\x2e\xce\xcf\x44\xe3\x5d\xd9\x63"
  578. "\x31\x94\x6b\x3e\xea\x72\xb4\xe5\x79\xa8\x53\xd9\xf3\xf0\x9b\xe5\xa3\x77"
  579. "\x95\x9f\x89\x88\x87\x23\xe2\xe3\xe1\xff\x35\xca\xf9\x62\xb5\x3c\xd3\xeb"
  580. "\xe0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  581. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x73\xa0\xc3"
  582. "\xfb\xff\x53\xbf\x0c\xf7\x7a\xed\x00\x80\x5d\xb3\xbf\xd7\x2b\x00\x00\xec"
  583. "\x39\xfd\x3f\x00\xf4\x1f\xfd\x3f\x00\xf4\x1f\xfd\x3f\x00\xf4\x1f\xfd\x3f"
  584. "\x00\xf4\x1f\xfd\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  585. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  586. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  587. "\x00\x00\xbb\xec\xd4\xc9\x93\x69\x5a\xfb\x73\x75\xa5\x98\x96\x67\x2e\x2c"
  588. "\x2d\xce\x55\x2f\x1c\x99\x29\xd5\xe6\xf2\x95\xc5\x62\xbe\x58\x5d\x38\x9f"
  589. "\x9f\xad\x56\x67\xcb\xa5\x7c\xb1\x5a\xb9\xd7\xdf\x2b\x57\xab\xe7\xa7\x63"
  590. "\x7e\xf1\xe2\x64\xbd\x54\xab\x4f\xd6\x96\x96\x4f\x57\xaa\x8b\xf3\xf5\xd3"
  591. "\xe7\x2a\x85\xd9\xd2\xe9\xd2\xd0\x9e\x44\x05\x00\x00\x00\x00\x00\x00\x00"
  592. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  593. "\x00\x00\x00\x00\x00\x00\xdb\x53\x5b\x5a\x9e\x2b\x94\xcb\xa5\x05\x19\x19"
  594. "\x19\x99\x8d\x4c\xaf\xcf\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  595. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  596. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  597. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  598. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  599. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  600. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  601. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  602. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  603. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  604. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  605. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  606. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  607. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  608. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  609. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  610. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  611. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  612. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  613. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  614. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  615. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  616. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  617. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  618. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  619. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  620. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  621. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  622. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  623. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  624. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  625. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  626. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  627. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  628. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  629. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  630. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  631. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  632. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  633. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  634. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  635. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  636. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  637. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  638. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  639. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  640. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
  641. "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff"
  642. "\x0e\xff\x04\x00\x00\xff\xff\x3e\x07\x2a\x2f",
  643. 1883);
  644. syz_mount_image(/*fs=*/0x200000001140, /*dir=*/0x2000000007c0,
  645. /*flags=MS_LAZYTIME|MS_NOATIME|MS_DIRSYNC*/ 0x2000480,
  646. /*opts=*/0x200000001180, /*chdir=*/1, /*size=*/0x75b,
  647. /*img=*/0x200000000840);
  648. // creat arguments: [
  649. // file: ptr[in, buffer] {
  650. // buffer: {2e 2f 62 75 73 00} (length 0x6)
  651. // }
  652. // mode: open_mode = 0x0 (8 bytes)
  653. // ]
  654. // returns fd
  655. memcpy((void*)0x200000000340, "./bus\000", 6);
  656. res = syscall(__NR_creat, /*file=*/0x200000000340ul, /*mode=*/0ul);
  657. if (res != -1)
  658. r[0] = res;
  659. // mount arguments: [
  660. // src: ptr[in, blockdev_filename] {
  661. // union blockdev_filename {
  662. // loop: loop_filename {
  663. // prefix: buffer: {2f 64 65 76 2f 6c 6f 6f 70} (length 0x9)
  664. // id: proc = 0x0 (1 bytes)
  665. // z: const = 0x0 (1 bytes)
  666. // }
  667. // }
  668. // }
  669. // dst: ptr[in, buffer] {
  670. // buffer: {2e 2f 62 75 73 00} (length 0x6)
  671. // }
  672. // type: nil
  673. // flags: mount_flags = 0x1000 (8 bytes)
  674. // data: nil
  675. // ]
  676. memcpy((void*)0x200000001280, "/dev/loop", 9);
  677. *(uint8_t*)0x200000001289 = 0x30;
  678. *(uint8_t*)0x20000000128a = 0;
  679. memcpy((void*)0x200000001240, "./bus\000", 6);
  680. syscall(__NR_mount, /*src=*/0x200000001280ul, /*dst=*/0x200000001240ul,
  681. /*type=*/0ul, /*flags=MS_BIND*/ 0x1000ul, /*data=*/0ul);
  682. // open arguments: [
  683. // file: ptr[in, buffer] {
  684. // buffer: {2e 2f 62 75 73 00} (length 0x6)
  685. // }
  686. // flags: open_flags = 0x14103e (8 bytes)
  687. // mode: open_mode = 0x0 (8 bytes)
  688. // ]
  689. // returns fd
  690. memcpy((void*)0x200000000400, "./bus\000", 6);
  691. res =
  692. syscall(__NR_open, /*file=*/0x200000000400ul,
  693. /*flags=O_SYNC|O_NOATIME|O_RDWR|0x3c*/ 0x14103eul, /*mode=*/0ul);
  694. if (res != -1)
  695. r[1] = res;
  696. // mmap arguments: [
  697. // addr: VMA[0x600000]
  698. // len: len = 0x600000 (8 bytes)
  699. // prot: mmap_prot = 0x2000002 (8 bytes)
  700. // flags: mmap_flags = 0x11 (8 bytes)
  701. // fd: fd (resource)
  702. // offset: intptr = 0x0 (8 bytes)
  703. // ]
  704. syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x600000ul,
  705. /*prot=PROT_GROWSUP|PROT_WRITE*/ 0x2000002ul,
  706. /*flags=MAP_FIXED|MAP_SHARED*/ 0x11ul, /*fd=*/r[1], /*offset=*/0ul);
  707. // open arguments: [
  708. // file: nil
  709. // flags: open_flags = 0x200 (8 bytes)
  710. // mode: open_mode = 0x3464a19e78acc807 (8 bytes)
  711. // ]
  712. // returns fd
  713. res = syscall(
  714. __NR_open, /*file=*/0ul, /*flags=O_TRUNC*/ 0x200ul,
  715. /*mode=S_IXOTH|S_IWOTH|S_IROTH|0x3464a19e78acc800*/ 0x3464a19e78acc807ul);
  716. if (res != -1)
  717. r[2] = res;
  718. // write$binfmt_elf64 arguments: [
  719. // fd: fd_binfmt (resource)
  720. // data: ptr[inout, array[ANYUNION]] {
  721. // array[ANYUNION] {
  722. // union ANYUNION {
  723. // ANYBLOB: buffer: {} (length 0x0)
  724. // }
  725. // }
  726. // }
  727. // len: bytesize = 0x78 (8 bytes)
  728. // ]
  729. syscall(__NR_write, /*fd=*/r[0], /*data=*/0x200000002800ul, /*len=*/0x78ul);
  730. // write$binfmt_elf64 arguments: [
  731. // fd: fd_binfmt (resource)
  732. // data: nil
  733. // len: bytesize = 0x78 (8 bytes)
  734. // ]
  735. syscall(__NR_write, /*fd=*/r[0], /*data=*/0ul, /*len=*/0x78ul);
  736. // ioctl$BTRFS_IOC_TREE_SEARCH arguments: [
  737. // fd: fd (resource)
  738. // cmd: const = 0xd0009411 (4 bytes)
  739. // arg: ptr[inout, btrfs_ioctl_search_args] {
  740. // btrfs_ioctl_search_args {
  741. // key: btrfs_ioctl_search_key {
  742. // tree_id: treeid (resource)
  743. // min_objectid: int64 = 0x3 (8 bytes)
  744. // max_objectid: int64 = 0x40 (8 bytes)
  745. // min_offset: int64 = 0x7 (8 bytes)
  746. // max_offset: int64 = 0x6 (8 bytes)
  747. // min_transid: int64 = 0xfffffffffffffff8 (8 bytes)
  748. // max_transid: int64 = 0x40000000 (8 bytes)
  749. // min_type: int32 = 0x7 (4 bytes)
  750. // max_type: int32 = 0xb88 (4 bytes)
  751. // nr_items: int32 = 0x9 (4 bytes)
  752. // unused: int32 = 0x6 (4 bytes)
  753. // unused1: int64 = 0xfffffffffffffffc (8 bytes)
  754. // unused2: int64 = 0x167 (8 bytes)
  755. // unused3: int64 = 0x0 (8 bytes)
  756. // unused4: int64 = 0x0 (8 bytes)
  757. // }
  758. // buf: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  759. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  760. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  761. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  762. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  763. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  764. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  765. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  766. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  767. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  768. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  769. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  770. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  771. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  772. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  773. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  774. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  775. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  776. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  777. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  778. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  779. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  780. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  781. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  782. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  783. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  784. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  785. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  786. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  787. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  788. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  789. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  790. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  791. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  792. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  793. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  794. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  795. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  796. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  797. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  798. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  799. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  800. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  801. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  802. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  803. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  804. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  805. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  806. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  807. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  808. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  809. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  810. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  811. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  812. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  813. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  814. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  815. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  816. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  817. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  818. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  819. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  820. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  821. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  822. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  823. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  824. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  825. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  826. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  827. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  828. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  829. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  830. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  831. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  832. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  833. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  834. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  835. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  836. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  837. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  838. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  839. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  840. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  841. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  842. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  843. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  844. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  845. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  846. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  847. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  848. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  849. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  850. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  851. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  852. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  853. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  854. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  855. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  856. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  857. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  858. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  859. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  860. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  861. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  862. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  863. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  864. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  865. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  866. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  867. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  868. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  869. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  870. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  871. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  872. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  873. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  874. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  875. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  876. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  877. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  878. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  879. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  880. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  881. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  882. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  883. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  884. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  885. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  886. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  887. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  888. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  889. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  890. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  891. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  892. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  893. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  894. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  895. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  896. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  897. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  898. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  899. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  900. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  901. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  902. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  903. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  904. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  905. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  906. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  907. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  908. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  909. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  910. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  911. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  912. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  913. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  914. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  915. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  916. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  917. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  918. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  919. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  920. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  921. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  922. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  923. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  924. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  925. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  926. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  927. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  928. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  929. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  930. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  931. // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00} (length
  932. // 0xf98)
  933. // }
  934. // }
  935. // ]
  936. *(uint64_t*)0x200000002880 = 0;
  937. *(uint64_t*)0x200000002888 = 3;
  938. *(uint64_t*)0x200000002890 = 0x40;
  939. *(uint64_t*)0x200000002898 = 7;
  940. *(uint64_t*)0x2000000028a0 = 6;
  941. *(uint64_t*)0x2000000028a8 = 0xfffffffffffffff8;
  942. *(uint64_t*)0x2000000028b0 = 0x40000000;
  943. *(uint32_t*)0x2000000028b8 = 7;
  944. *(uint32_t*)0x2000000028bc = 0xb88;
  945. *(uint32_t*)0x2000000028c0 = 9;
  946. *(uint32_t*)0x2000000028c4 = 6;
  947. *(uint64_t*)0x2000000028c8 = 0xfffffffffffffffc;
  948. *(uint64_t*)0x2000000028d0 = 0x167;
  949. *(uint64_t*)0x2000000028d8 = 0;
  950. *(uint64_t*)0x2000000028e0 = 0;
  951. memset((void*)0x2000000028e8, 0, 3992);
  952. syscall(__NR_ioctl, /*fd=*/r[2], /*cmd=*/0xd0009411,
  953. /*arg=*/0x200000002880ul);
  954. return 0;
  955. }
  956.  
Advertisement
Add Comment
Please, Sign In to add comment