• Andrei Vagin's avatar
    unix: a unix name can be a non-null terminated string · 8abb4a7f
    Andrei Vagin authored
    In this patch, we replace all zero characters to '@'.
    
    ==30==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000e3ca at pc 0x7f34144b6be1 bp 0x7ffee7b6bb20 sp 0x7ffee7b6b298
    READ of size 26 at 0x60300000e3ca thread T0
        #0 0x7f34144b6be0  (/lib64/libasan.so.3+0x8dbe0)
        #1 0x7f34144b8e4d in __interceptor_vsnprintf (/lib64/libasan.so.3+0x8fe4d)
        #2 0x4966cb in vprint_on_level criu/log.c:228
        #3 0x496b64 in print_on_level criu/log.c:249
        #4 0x505c94 in collect_one_unixsk criu/sk-unix.c:1401
        #5 0x4e7ae3 in collect_image criu/protobuf.c:213
        #6 0x462c5c in root_prepare_shared criu/cr-restore.c:247
        #7 0x462c5c in restore_task_with_children criu/cr-restore.c:1420
        #8 0x7f34132d70ec in __clone (/lib64/libc.so.6+0x1030ec)
    
    0x60300000e3ca is located 0 bytes to the right of 26-byte region [0x60300000e3b0,0x60300000e3ca)
    allocated by thread T0 here:
        #0 0x7f34144efe70 in malloc (/lib64/libasan.so.3+0xc6e70)
        #1 0x7f3413bdb021  (/lib64/libprotobuf-c.so.1+0x6021)
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    8abb4a7f
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...