Syscall sandbox fails on Ubuntu 22.04 #24368

issue laanwj openend this issue on February 17, 2022
  1. laanwj commented at 1:49 pm on February 17, 2022: member

    It doesn’t even specify which “invalid syscall”.

     0$ src/bitcoind -sandbox=log-and-abort
     12022-02-17T13:45:57Z Bitcoin Core version v22.99.0-b223c3c21e89 (release build)
     22022-02-17T13:45:57Z Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures.
     32022-02-17T13:45:57Z Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280
     42022-02-17T13:45:57Z Experimental syscall sandbox enabled (-sandbox=log-and-abort): bitcoind will terminate if an unexpected (not allowlisted) syscall is invoked.
     52022-02-17T13:45:57Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
     62022-02-17T13:45:57Z Default data directory /…/.bitcoin
     72022-02-17T13:45:57Z Using data directory /…/.bitcoin
     82022-02-17T13:45:57Z Config file: /…/.bitcoin/bitcoin.conf (not found, skipping)
     92022-02-17T13:45:57Z Command-line arg: sandbox="log-and-abort"
    102022-02-17T13:45:57Z Using at most 125 automatic connections (1024 file descriptors available)
    112022-02-17T13:45:57Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
    122022-02-17T13:45:57Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
    132022-02-17T13:45:57Z Script verification uses 1 additional threads
    14Bad system call (core dumped)
    

    Nothing in dmesg either.

  2. laanwj added the label Bug on Feb 17, 2022
  3. laanwj added the label Linux/Unix on Feb 17, 2022
  4. laanwj commented at 1:50 pm on February 17, 2022: member

    Gdb gives some more information about the crash. Looks like it’s clone3?

    0rseq_register_current_thread (do_rseq=<optimized out>, self=0x7ffff50ee640) at ../sysdeps/unix/sysv/linux/rseq-internal.h:37
    137      ../sysdeps/unix/sysv/linux/rseq-internal.h: No such file or directory.
    2(gdb) bt
    3[#0](/bitcoin-bitcoin/0/)  rseq_register_current_thread (do_rseq=<optimized out>, self=0x7ffff50ee640) at ../sysdeps/unix/sysv/linux/rseq-internal.h:37
    4[#1](/bitcoin-bitcoin/1/)  start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:373
    5[#2](/bitcoin-bitcoin/2/)  0x00007ffff7809b80 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    

    Edit: but this one is already allowed in AllowProcessStartOrDeath(). Edit.2: rseq is the culprit.

  5. laanwj referenced this in commit 6c4fd36089 on Feb 17, 2022
  6. fanquake closed this on Feb 20, 2022

  7. fanquake referenced this in commit ffcbaf569e on Feb 20, 2022
  8. sidhujag referenced this in commit b682a26f07 on Feb 20, 2022
  9. DrahtBot locked this on Feb 20, 2023


laanwj

Labels
Bug Linux/Unix


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-03 10:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me