liburing icon indicating copy to clipboard operation
liburing copied to clipboard

Add support for sanitizing user provided pointers

Open Oipo opened this issue 1 year ago • 0 comments

This PR introduces the initial plumbing for supporting address sanitizer checking the opague, user-provided pointers. It does this by looping over the sqe's in userspace in __io_uring_submit, check their opcodes and use the sanitizer interface to check for memory poison values.

As this is a proof of concept, please take a look and suggest improvements/changes.

TODO

  • Fix tests, as there are quite a couple that do not clean up allocated buffers/iovecs
  • Look at IOSQE_USER_DATA_IS_POINTER and see if there is a better way
  • Add a test for IOSQE_USER_DATA_IS_POINTER
  • Verify changes to github actions works as intended

Click to show/hide current test output
make[1]: Entering directory '/home/oipo/Programming/Ichor/external/liburing/src'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/oipo/Programming/Ichor/external/liburing/src'
make[1]: Entering directory '/home/oipo/Programming/Ichor/external/liburing/test'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/oipo/Programming/Ichor/external/liburing/test'
make[1]: Entering directory '/home/oipo/Programming/Ichor/external/liburing/examples'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/oipo/Programming/Ichor/external/liburing/examples'
make[1]: Entering directory '/home/oipo/Programming/Ichor/external/liburing/test'
Running test 232c93d07b74.t                                         4 sec
Running test 35fa71a030ca.t                                         5 sec
Running test 500f9fbadef8.t                                         0 sec
Running test 7ad0e4b2f83c.t                                         1 sec
Running test 8a9973408177.t                                         0 sec
Running test 917257daa0fe.t                                         0 sec
Running test a0908ae19763.t                                         0 sec
Running test a4c0b3decb33.t                                         1 sec
Running test accept.t                                               
=================================================================
==230591==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 432 byte(s) in 3 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415899 in test_accept_nonblock /home/oipo/Programming/Ichor/external/liburing/test/accept.c:672
    #6 0x405445 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:788
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 432 byte(s) in 3 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415899 in test_accept_nonblock /home/oipo/Programming/Ichor/external/liburing/test/accept.c:672
    #6 0x405445 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:788
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 288 byte(s) in 2 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415727 in test_accept /home/oipo/Programming/Ichor/external/liburing/test/accept.c:597
    #6 0x4053e8 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:764
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 288 byte(s) in 2 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415727 in test_accept /home/oipo/Programming/Ichor/external/liburing/test/accept.c:597
    #6 0x405400 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:770
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 288 byte(s) in 2 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415727 in test_accept /home/oipo/Programming/Ichor/external/liburing/test/accept.c:597
    #6 0x4053e8 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:764
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 288 byte(s) in 2 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415727 in test_accept /home/oipo/Programming/Ichor/external/liburing/test/accept.c:597
    #6 0x405400 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:770
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x40576e in test_accept_fixed /home/oipo/Programming/Ichor/external/liburing/test/accept.c:694
    #6 0x40576e in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:794
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x40576e in test_accept_fixed /home/oipo/Programming/Ichor/external/liburing/test/accept.c:694
    #6 0x40576e in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:794
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415899 in test_accept_nonblock /home/oipo/Programming/Ichor/external/liburing/test/accept.c:672
    #6 0x405415 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:776
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415899 in test_accept_nonblock /home/oipo/Programming/Ichor/external/liburing/test/accept.c:672
    #6 0x40542d in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:782
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415899 in test_accept_nonblock /home/oipo/Programming/Ichor/external/liburing/test/accept.c:672
    #6 0x40542d in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:782
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415ad8 in test_accept_sqpoll /home/oipo/Programming/Ichor/external/liburing/test/accept.c:744
    #6 0x405d91 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:812
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415899 in test_accept_nonblock /home/oipo/Programming/Ichor/external/liburing/test/accept.c:672
    #6 0x405415 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:776
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415ad8 in test_accept_sqpoll /home/oipo/Programming/Ichor/external/liburing/test/accept.c:744
    #6 0x405d91 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:812
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410e69 in queue_recv /home/oipo/Programming/Ichor/external/liburing/test/accept.c:82
    #3 0x410e69 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:344
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415727 in test_accept /home/oipo/Programming/Ichor/external/liburing/test/accept.c:597
    #6 0x4053c6 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:756
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

Direct leak of 144 byte(s) in 1 object(s) allocated from:
    #0 0x7f494acfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x416008 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x410a78 in queue_send /home/oipo/Programming/Ichor/external/liburing/test/accept.c:68
    #3 0x410a78 in test_loop /home/oipo/Programming/Ichor/external/liburing/test/accept.c:343
    #4 0x415501 in test /home/oipo/Programming/Ichor/external/liburing/test/accept.c:385
    #5 0x415727 in test_accept /home/oipo/Programming/Ichor/external/liburing/test/accept.c:597
    #6 0x4053c6 in main /home/oipo/Programming/Ichor/external/liburing/test/accept.c:756
    #7 0x7f494a029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f494a029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #9 0x406d34 in _start (/home/oipo/Programming/Ichor/external/liburing/test/accept.t+0x406d34)

SUMMARY: AddressSanitizer: 3456 byte(s) leaked in 24 allocation(s).
Test accept.t failed with ret 1
Running test accept-link.t                                          0 sec
Running test accept-non-empty.t                                     Skipped
Running test accept-reuse.t                                         0 sec
Running test accept-test.t                                          0 sec
Running test across-fork.t                                          0 sec
Running test b19062a56726.t                                         0 sec
Running test b5837bd5311d.t                                         0 sec
Running test bind-listen.t                                          Skipped
Running test buf-ring.t                                             0 sec
Running test buf-ring-nommap.t                                      Tracer caught signal 11: addr=0x52d000004000 pc=0x7f4e8c533570 sp=0x7f4e88400c20
==230681==LeakSanitizer has encountered a fatal error.
==230681==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==230681==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Test buf-ring-nommap.t failed with ret 1
Running test buf-ring-put.t                                         1 sec
Running test ce593a6c480a.t                                         1 sec
Running test close-opath.t                                          0 sec
Running test connect.t                                              0 sec
Running test connect-rep.t                                          0 sec
Running test coredump.t                                             Skipped
Running test cq-full.t                                              0 sec
Running test cq-overflow.t                                          
=================================================================
==230743==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x7ff851efbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x40da99 in t_posix_memalign /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:58
    #2 0x40da99 in t_create_buffers /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:117
    #3 0x404169 in main /home/oipo/Programming/Ichor/external/liburing/test/cq-overflow.c:495
    #4 0x7ff851229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7ff851229e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x4046f4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/cq-overflow.t+0x4046f4)

SUMMARY: AddressSanitizer: 4096 byte(s) leaked in 1 allocation(s).
Test cq-overflow.t failed with ret 1
Running test cq-peek-batch.t                                        0 sec
Running test cq-ready.t                                             0 sec
Running test cq-size.t                                              0 sec
Running test d4ae271dfaae.t                                         0 sec
Running test d77a67ed5f27.t                                         0 sec
Running test defer.t                                                3 sec
Running test defer-taskrun.t                                        0 sec
Running test defer-tw-timeout.t                                     2 sec
Running test double-poll-crash.t                                    0 sec
Running test drop-submit.t                                          0 sec
Running test eeed8b54e0df.t                                         0 sec
Running test empty-eownerdead.t                                     0 sec
Running test eploop.t                                               0 sec
Running test eventfd.t                                              0 sec
Running test eventfd-disable.t                                      0 sec
Running test eventfd-reg.t                                          0 sec
Running test eventfd-ring.t                                         0 sec
Running test evloop.t                                               0 sec
Running test exec-target.t                                          0 sec
Running test exit-no-cleanup.t                                      0 sec
Running test fadvise.t                                              0 sec
Running test fallocate.t                                            0 sec
Running test fc2a85cb02ef.t                                         Test needs failslab/fail_futex/fail_page_alloc enabled, skipped
Skipped
Running test fd-install.t                                           0 sec
Running test fd-pass.t                                              0 sec
Running test fdinfo.t                                               0 sec
Running test file-register.t                                        3 sec
Running test files-exit-hang-poll.t                                 1 sec
Running test files-exit-hang-timeout.t                              1 sec
Running test file-update.t                                          0 sec
Running test file-verify.t                                          1 sec
Running test fixed-buf-iter.t                                       0 sec
Running test fixed-buf-merge.t                                      0 sec
Running test fixed-hugepage.t                                       Unable to map hugetlb page. Try increasing the value in /proc/sys/vm/nr_hugepages
Skipped
Running test fixed-link.t                                           read: wanted 18, got -9

=================================================================
==231139==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x7fa8710fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x405ef8 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x403d1a in main /home/oipo/Programming/Ichor/external/liburing/test/fixed-link.c:37
    #3 0x7fa870429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7fa870429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x405d14 in _start (/home/oipo/Programming/Ichor/external/liburing/test/fixed-link.t+0x405d14)

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x7fa8710fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x405ef8 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x403cc7 in main /home/oipo/Programming/Ichor/external/liburing/test/fixed-link.c:37
    #3 0x7fa870429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7fa870429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x405d14 in _start (/home/oipo/Programming/Ichor/external/liburing/test/fixed-link.t+0x405d14)

SUMMARY: AddressSanitizer: 128 byte(s) leaked in 2 allocation(s).
Test fixed-link.t failed with ret 1
Running test fixed-reuse.t                                          0 sec
Running test fpos.t                                                 0 sec
Running test fsnotify.t                                             Skipped
Running test fsync.t                                                0 sec
Running test futex.t                                                AddressSanitizer:DEADLYSIGNAL
=================================================================
==231178==ERROR: AddressSanitizer: SEGV on unknown address 0x00009fff7fff (pc 0x7f57187000cd bp 0x000000000000 sp 0x7ffcbb534af8 T0)
==231178==The signal is caused by a READ memory access.
    #0 0x7f57187000cd in AddressIsPoisoned ../../../../gcc-14.2.0/libsanitizer/asan/asan_mapping.h:396
    #1 0x7f57187000cd in __asan_address_is_poisoned ../../../../gcc-14.2.0/libsanitizer/asan/asan_poisoning.cpp:170
    #2 0x413d86 in __io_uring_submit (/home/oipo/Programming/Ichor/external/liburing/test/futex.t+0x413d86)
    #3 0x4096c9 in __test /home/oipo/Programming/Ichor/external/liburing/test/futex.c:101
    #4 0x4096c9 in test /home/oipo/Programming/Ichor/external/liburing/test/futex.c:152
    #5 0x403f0e in main /home/oipo/Programming/Ichor/external/liburing/test/futex.c:472
    #6 0x7f5717a29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #7 0x7f5717a29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #8 0x405484 in _start (/home/oipo/Programming/Ichor/external/liburing/test/futex.t+0x405484)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../../../../gcc-14.2.0/libsanitizer/asan/asan_mapping.h:396 in AddressIsPoisoned
==231178==ABORTING
Test futex.t failed with ret 1
Running test hardlink.t                                             not root, skipping AT_EMPTY_PATH test
0 sec
Running test ignore-single-mmap.t                                   0 sec
Running test init-mem.t                                             
=================================================================
==231199==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2097152 byte(s) in 1 object(s) allocated from:
    #0 0x7f748e6fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x40409a in setup_ctx /home/oipo/Programming/Ichor/external/liburing/test/init-mem.c:42
    #2 0x40409a in test /home/oipo/Programming/Ichor/external/liburing/test/init-mem.c:96
    #3 0x40409a in main /home/oipo/Programming/Ichor/external/liburing/test/init-mem.c:153
    #4 0x7f748da29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f748da29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x407bb4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/init-mem.t+0x407bb4)

SUMMARY: AddressSanitizer: 2097152 byte(s) leaked in 1 allocation(s).
Test init-mem.t failed with ret 1
Running test io-cancel.t                                            2 sec
Running test iopoll.t                                               0 sec
Running test iopoll-leak.t                                          
=================================================================
==231234==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7f80dacfc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x405108 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x405108 in t_create_buffers /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:115
    #3 0x403f17 in do_iopoll /home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.c:33
    #4 0x403f17 in test /home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.c:55
    #5 0x403f17 in main /home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.c:77
    #6 0x7f80da029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #7 0x7f80da029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #8 0x404b44 in _start (/home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.t+0x404b44)

Indirect leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x7f80dacfbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x405189 in t_posix_memalign /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:58
    #2 0x405189 in t_create_buffers /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:117
    #3 0x403f17 in do_iopoll /home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.c:33
    #4 0x403f17 in test /home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.c:55
    #5 0x403f17 in main /home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.c:77
    #6 0x7f80da029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #7 0x7f80da029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #8 0x404b44 in _start (/home/oipo/Programming/Ichor/external/liburing/test/iopoll-leak.t+0x404b44)

SUMMARY: AddressSanitizer: 4112 byte(s) leaked in 2 allocation(s).
Test iopoll-leak.t failed with ret 1
Running test iopoll-overflow.t                                      1 sec
Running test io_uring_enter.t                                       cqe->res: -9, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
cqe->res: -125, expected 4096
0 sec
Running test io_uring_passthrough.t                                 Skipped
Running test io_uring_register.t                                    Unable to map a huge page.  Try increasing /proc/sys/vm/nr_hugepages by at least 1.
Skipping the hugepage test
1 sec
Running test io_uring_setup.t                                       0 sec
Running test lfs-openat.t                                           0 sec
Running test lfs-openat-write.t                                     0 sec
Running test link.t                                                 0 sec
Running test link_drain.t                                           0 sec
Running test link-timeout.t                                         1 sec
Running test madvise.t                                              
=================================================================
==231378==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 13107200 byte(s) in 100 object(s) allocated from:
    #0 0x7f03dd6fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x406448 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x403fc1 in test_madvise /home/oipo/Programming/Ichor/external/liburing/test/madvise.c:107
    #3 0x403fc1 in main /home/oipo/Programming/Ichor/external/liburing/test/madvise.c:172
    #4 0x7f03dca29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f03dca29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x4045c4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/madvise.t+0x4045c4)

SUMMARY: AddressSanitizer: 13107200 byte(s) leaked in 100 allocation(s).
Test madvise.t failed with ret 1
Running test min-timeout.t                                          Skipped
Running test min-timeout-wait.t                                     Skipped
Running test mkdir.t                                                0 sec
Running test msg-ring.t                                             0 sec
Running test msg-ring-fd.t                                          0 sec
Running test msg-ring-flags.t                                       0 sec
Running test msg-ring-overflow.t                                    0 sec
Running test multicqes_drain.t                                      20 sec
Running test napi-test.t                                            NAPI test requires root
Skipped
Running test no-mmap-inval.t                                        
=================================================================
==231497==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8192 byte(s) in 1 object(s) allocated from:
    #0 0x7f08b3efbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x404488 in t_posix_memalign /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:58
    #2 0x403d0c in main /home/oipo/Programming/Ichor/external/liburing/test/no-mmap-inval.c:29
    #3 0x7f08b3229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7f08b3229e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x403fb4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/no-mmap-inval.t+0x403fb4)

SUMMARY: AddressSanitizer: 8192 byte(s) leaked in 1 allocation(s).
Test no-mmap-inval.t failed with ret 1
Running test nolibc.t                                               0 sec
Running test nop-all-sizes.t                                        0 sec
Running test nop.t                                                  0 sec
Running test ooo-file-unreg.t                                       1 sec
Running test openat2.t                                              0 sec
Running test open-close.t                                           0 sec
Running test open-direct-link.t                                     0 sec
Running test open-direct-pick.t                                     0 sec
Running test personality.t                                          Not root, skipping
0 sec
Running test pipe-bug.t                                             0 sec
Running test pipe-eof.t                                             0 sec
Running test pipe-reuse.t                                           0 sec
Running test poll.t                                                 0 sec
Running test poll-cancel.t                                          sqe (add=1/remove=0) failed with -9
test_poll_cancel failed
Test poll-cancel.t failed with ret 255
Running test poll-cancel-all.t                                      1 sec
Running test poll-cancel-ton.t                                      0 sec
Running test poll-link.t                                            0 sec
Running test poll-many.t                                            1 sec
Running test poll-mshot-overflow.t                                  0 sec
Running test poll-mshot-update.t                                    1 sec
Running test poll-race.t                                            0 sec
Running test poll-race-mshot.t                                      1 sec
Running test poll-ring.t                                            0 sec
Running test poll-v-poll.t                                          0 sec
Running test probe.t                                                0 sec
Running test read-before-exit.t                                     1 sec
Running test read-mshot.t                                           0 sec
Running test read-mshot-empty.t                                     
=================================================================
==238979==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7fe9e28fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x403e53 in main /home/oipo/Programming/Ichor/external/liburing/test/read-mshot-empty.c:96
    #2 0x7fe9e1c29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #3 0x7fe9e1c29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #4 0x405f14 in _start (/home/oipo/Programming/Ichor/external/liburing/test/read-mshot-empty.t+0x405f14)

SUMMARY: AddressSanitizer: 128 byte(s) leaked in 1 allocation(s).
Test read-mshot-empty.t failed with ret 1
Running test read-write.t                                           Not root, skipping test_write_efbig

=================================================================
==238988==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2064 byte(s) in 1 object(s) allocated from:
    #0 0x7fe2282fbfe0 in calloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x418a88 in t_calloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:69
    #2 0x404860 in has_nonvec_read /home/oipo/Programming/Ichor/external/liburing/test/read-write.c:324
    #3 0x404860 in main /home/oipo/Programming/Ichor/external/liburing/test/read-write.c:877
    #4 0x7fe227629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7fe227629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x409d54 in _start (/home/oipo/Programming/Ichor/external/liburing/test/read-write.t+0x409d54)

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7fe2282fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x418b08 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x418b08 in t_create_buffers /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:115
    #3 0x404816 in main /home/oipo/Programming/Ichor/external/liburing/test/read-write.c:874
    #4 0x7fe227629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7fe227629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x409d54 in _start (/home/oipo/Programming/Ichor/external/liburing/test/read-write.t+0x409d54)

Indirect leak of 262144 byte(s) in 32 object(s) allocated from:
    #0 0x7fe2282fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x418b89 in t_posix_memalign /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:58
    #2 0x418b89 in t_create_buffers /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:117
    #3 0x404816 in main /home/oipo/Programming/Ichor/external/liburing/test/read-write.c:874
    #4 0x7fe227629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7fe227629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x409d54 in _start (/home/oipo/Programming/Ichor/external/liburing/test/read-write.t+0x409d54)

SUMMARY: AddressSanitizer: 264720 byte(s) leaked in 34 allocation(s).
Test read-write.t failed with ret 1
Running test recv-msgall.t                                          
=================================================================
==239050==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7f59f30fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404323 in do_send /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.c:162
    #2 0x404323 in test /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.c:237
    #3 0x403dc2 in main /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.c:256
    #4 0x7f59f2429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f59f2429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x403f64 in _start (/home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.t+0x403f64)

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7f59f30fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404323 in do_send /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.c:162
    #2 0x404323 in test /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.c:237
    #3 0x403d7a in main /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.c:250
    #4 0x7f59f2429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f59f2429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x403f64 in _start (/home/oipo/Programming/Ichor/external/liburing/test/recv-msgall.t+0x403f64)

SUMMARY: AddressSanitizer: 1024 byte(s) leaked in 2 allocation(s).
Test recv-msgall.t failed with ret 1
Running test recv-msgall-stream.t                                   
=================================================================
==239059==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7f93ac2fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404e4a in do_send /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:276
    #2 0x404e4a in test /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:361
    #3 0x403e5a in main /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:379
    #4 0x7f93ab629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f93ab629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x4040b4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.t+0x4040b4)

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7f93ac2fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404e4a in do_send /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:276
    #2 0x404e4a in test /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:361
    #3 0x403eab in main /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:385
    #4 0x7f93ab629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f93ab629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x4040b4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.t+0x4040b4)

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7f93ac2fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404e4a in do_send /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:276
    #2 0x404e4a in test /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:361
    #3 0x403eff in main /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:391
    #4 0x7f93ab629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f93ab629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x4040b4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.t+0x4040b4)

Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7f93ac2fc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404e4a in do_send /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:276
    #2 0x404e4a in test /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:361
    #3 0x403e0c in main /home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.c:373
    #4 0x7f93ab629d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f93ab629e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x4040b4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/recv-msgall-stream.t+0x4040b4)

SUMMARY: AddressSanitizer: 2048 byte(s) leaked in 4 allocation(s).
Test recv-msgall-stream.t failed with ret 1
Running test recv-multishot.t                                       1 sec
Running test reg-fd-only.t                                          Enable huge pages to test big rings
Skipped
Running test reg-hint.t                                             0 sec
Running test reg-reg-ring.t                                         0 sec
Running test regbuf-merge.t                                         0 sec
Running test register-restrictions.t                                0 sec
Running test rename.t                                               0 sec
Running test ringbuf-read.t                                         
=================================================================
==239121==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 262144 byte(s) in 1 object(s) allocated from:
    #0 0x7f32b86fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x404470 in test /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:68
    #2 0x403faa in main /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:175
    #3 0x7f32b7a29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7f32b7a29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x404264 in _start (/home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.t+0x404264)

Direct leak of 262144 byte(s) in 1 object(s) allocated from:
    #0 0x7f32b86fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x404470 in test /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:68
    #2 0x403f3c in main /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:169
    #3 0x7f32b7a29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7f32b7a29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x404264 in _start (/home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.t+0x404264)

Direct leak of 262144 byte(s) in 1 object(s) allocated from:
    #0 0x7f32b86fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x404470 in test /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:68
    #2 0x403f1e in main /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:161
    #3 0x7f32b7a29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7f32b7a29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x404264 in _start (/home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.t+0x404264)

Direct leak of 262144 byte(s) in 1 object(s) allocated from:
    #0 0x7f32b86fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x404470 in test /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:68
    #2 0x403fc2 in main /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.c:181
    #3 0x7f32b7a29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7f32b7a29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x404264 in _start (/home/oipo/Programming/Ichor/external/liburing/test/ringbuf-read.t+0x404264)

SUMMARY: AddressSanitizer: 1048576 byte(s) leaked in 4 allocation(s).
Test ringbuf-read.t failed with ret 1
Running test ringbuf-status.t                                       
=================================================================
==239145==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x7feae30fbc1d in posix_memalign ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x405180 in test /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-status.c:105
    #2 0x403ddd in main /home/oipo/Programming/Ichor/external/liburing/test/ringbuf-status.c:229
    #3 0x7feae2429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7feae2429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x404c14 in _start (/home/oipo/Programming/Ichor/external/liburing/test/ringbuf-status.t+0x404c14)

SUMMARY: AddressSanitizer: 256 byte(s) leaked in 1 allocation(s).
Test ringbuf-status.t failed with ret 1
Running test ring-leak2.t                                           1 sec
Running test ring-leak.t                                            Skipped
Running test rsrc_tags.t                                            0 sec
Running test rw_merge_test.t                                        0 sec
Running test self.t                                                 0 sec
Running test recvsend_bundle.t                                      Skipped
Running test send_recv.t                                            0 sec
Running test send_recvmsg.t                                         0 sec
Running test send-zerocopy.t                                        37 sec
Running test shared-wq.t                                            0 sec
Running test short-read.t                                           
=================================================================
==239337==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x7fd140afc627 in malloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x404be8 in t_malloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:27
    #2 0x403cb8 in main /home/oipo/Programming/Ichor/external/liburing/test/short-read.c:29
    #3 0x7fd13fe29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #4 0x7fd13fe29e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #5 0x404a04 in _start (/home/oipo/Programming/Ichor/external/liburing/test/short-read.t+0x404a04)

SUMMARY: AddressSanitizer: 4096 byte(s) leaked in 1 allocation(s).
Test short-read.t failed with ret 1
Running test shutdown.t                                             0 sec
Running test sigfd-deadlock.t                                       0 sec
Running test single-issuer.t                                        0 sec
Running test skip-cqe.t                                             0 sec
Running test socket.t                                               0 sec
Running test socket-io-cmd.t                                        Not able to create a raw socket: Operation not permitted
Skipped
Running test socket-getsetsock-cmd.t                                Test socket-getsetsock-cmd.t timed out (may not be a failure)
Running test socket-rw.t                                            0 sec
Running test socket-rw-eagain.t                                     0 sec
Running test socket-rw-offset.t                                     0 sec
Running test splice.t                                               
=================================================================
==239459==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 65536 byte(s) in 1 object(s) allocated from:
    #0 0x7fa5e2cfbfe0 in calloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x408658 in t_calloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:69
    #2 0x404034 in init_splice_ctx /home/oipo/Programming/Ichor/external/liburing/test/splice.c:92
    #3 0x404034 in main /home/oipo/Programming/Ichor/external/liburing/test/splice.c:465
    #4 0x7fa5e2029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7fa5e2029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x404ea4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/splice.t+0x404ea4)

Direct leak of 65536 byte(s) in 1 object(s) allocated from:
    #0 0x7fa5e2cfbfe0 in calloc ../../../../gcc-14.2.0/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x408658 in t_calloc /home/oipo/Programming/Ichor/external/liburing/test/helpers.c:69
    #2 0x403ffc in init_splice_ctx /home/oipo/Programming/Ichor/external/liburing/test/splice.c:91
    #3 0x403ffc in main /home/oipo/Programming/Ichor/external/liburing/test/splice.c:465
    #4 0x7fa5e2029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7fa5e2029e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x404ea4 in _start (/home/oipo/Programming/Ichor/external/liburing/test/splice.t+0x404ea4)

SUMMARY: AddressSanitizer: 131072 byte(s) leaked in 2 allocation(s).
Test splice.t failed with ret 1
Running test sq-full.t                                              0 sec
Running test sq-full-cpp.t                                          0 sec
Running test sqpoll-disable-exit.t                                  sqpoll-disable-exit.c:94:17: runtime error: store to null pointer of type 'void *'
    #0 0x40408f in syz_io_uring_setup /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:94
    #1 0x40408f in execute_one /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:187
    #2 0x40408f in loop /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:159
    #3 0x40408f in main /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:194
    #4 0x7f9045429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f9045429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x404374 in _start (/home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.t+0x404374)

AddressSanitizer:DEADLYSIGNAL
=================================================================
==239483==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004040a7 bp 0xffffffffffffffff sp 0x7ffc4854ca10 T0)
==239483==The signal is caused by a WRITE memory access.
==239483==Hint: address points to the zero page.
    #0 0x4040a7 in syz_io_uring_setup /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:94
    #1 0x4040a7 in execute_one /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:187
    #2 0x4040a7 in loop /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:159
    #3 0x4040a7 in main /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:194
    #4 0x7f9045429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f9045429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x404374 in _start (/home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.t+0x404374)

AddressSanitizer:DEADLYSIGNAL
=================================================================
==239698==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004040a7 bp 0xffffffffffffffff sp 0x7ffc4854ca10 T0)
==239698==The signal is caused by a WRITE memory access.
==239698==Hint: address points to the zero page.
    #0 0x4040a7 in syz_io_uring_setup /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:94
    #1 0x4040a7 in execute_one /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:187
    #2 0x4040a7 in loop /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:159
    #3 0x4040a7 in main /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:194
    #4 0x7f9045429d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #5 0x7f9045429e3f in __libc_start_main_impl ../csu/libc-start.c:392
    #6 0x404374 in _start (/home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.t+0x404374)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/oipo/Programming/Ichor/external/liburing/test/sqpoll-disable-exit.c:94 in syz_io_uring_setup
==239698==ABORTING
14 sec
Running test sqpoll-exec.t                                          0 sec
Running test sq-poll-dup.t                                          0 sec
Running test sqpoll-exit-hang.t                                     1 sec
Running test sq-poll-kthread.t                                      2 sec
Running test sq-poll-share.t                                        1 sec
Running test sqpoll-sleep.t                                         0 sec
Running test sq-space_left.t                                        0 sec
Running test stdout.t                                               This is a pipe test
This is a fixed pipe test
0 sec
Running test submit-and-wait.t                                      1 sec
Running test submit-link-fail.t                                     0 sec
Running test submit-reuse.t                                         1 sec
Running test symlink.t                                              0 sec
Running test sync-cancel.t                                          0 sec
Running test teardowns.t                                            0 sec
Running test thread-exit.t                                          0 sec
Running test timeout.t                                              res: -62
test_single_timeout_nr(1) failed
Test timeout.t failed with ret 1
Running test timeout-new.t                                          2 sec
Running test truncate.t                                             0 sec
Running test tty-write-dpoll.t                                      0 sec
Running test unlink.t                                               0 sec
Running test version.t                                              0 sec
Running test waitid.t                                               3 sec
Running test wait-timeout.t                                         Skipped
Running test wakeup-hang.t                                          2 sec
Running test wq-aff.t                                               0 sec
Running test xattr.t                                                0 sec
Running test statx.t                                                0 sec
Running test sq-full-cpp.t                                          0 sec [0]
Tests timed out (1): <socket-getsetsock-cmd.t>
Tests failed (19): <accept.t> <buf-ring-nommap.t> <cq-overflow.t> <fixed-link.t> <futex.t> <init-mem.t> <iopoll-leak.t> <madvise.t> <no-mmap-inval.t> <poll-cancel.t> <read-mshot-empty.t> <read-write.t> <recv-msgall.t> <recv-msgall-stream.t> <ringbuf-read.t> <ringbuf-status.t> <short-read.t> <splice.t> <timeout.t>
make[1]: *** [Makefile:303: runtests] Error 1
make[1]: Leaving directory '/home/oipo/Programming/Ichor/external/liburing/test'
make: *** [Makefile:21: runtests] Error 2

git request-pull output:

The following changes since commit 441bffd3cb018b8efa9413e43d3ab135ec3c9178:

  test/init-mem: fix 32-bit compat mode (2024-08-28 10:16:57 -0600)

are available in the Git repository at:

  [email protected]:Oipo/liburing.git 

for you to fetch changes up to 1a53207ebb509adc64e3b24ef07fbe92158e5ab4:

  Add support for sanitizing user provided pointers (2024-08-29 19:09:30 +0200)

----------------------------------------------------------------
Michael de Lang (1):
      Add support for sanitizing user provided pointers

 .github/workflows/build.yml     | 23 ++++++++++++++++++++++-
 examples/Makefile               |  6 ++++++
 src/Makefile                    | 12 +++++++++++-
 src/include/liburing.h          |  9 +++++++++
 src/include/liburing/io_uring.h |  1 +
 src/queue.c                     | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 test/500f9fbadef8.c             |  2 ++
 test/Makefile                   | 25 +++++++++++++++++++++----
 test/asan_prep_link_timeout.c   | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 test/buf-ring.c                 |  2 ++
 test/coredump.c                 |  4 ++++
 test/cq-overflow.c              | 14 ++++++++++++++
 test/d4ae271dfaae.c             |  4 ++++
 test/defer-tw-timeout.c         |  3 +++
 test/eeed8b54e0df.c             |  2 ++
 test/fadvise.c                  |  7 +++++--
 test/fdinfo.c                   |  2 ++
 test/file-register.c            | 16 ++++++++++++++--
 test/fixed-buf-iter.c           |  5 ++++-
 test/runtests.sh                |  5 ++++-
 test/stdout.c                   |  2 ++
 21 files changed, 243 insertions(+), 12 deletions(-)
 create mode 100644 test/asan_prep_link_timeout.c


By submitting this pull request, I acknowledge that:

  1. I have followed the above pull request guidelines.
  2. I have the rights to submit this work under the same license.
  3. I agree to a Developer Certificate of Origin (see https://developercertificate.org for more information).

Oipo avatar Aug 29 '24 17:08 Oipo