mirror of
https://github.com/Aorimn/dislocker
synced 2026-06-08 10:24:29 +00:00
95e2483dfe
They have 20 entries, not 22.
Found when trying to mount an image and getting a segfault:
$ sudo losetup -P /dev/loop100 /user/src_image.img.ntfs_aes_xts.bitlocker
$ sudo ./src/dislocker-fuse -v -V /dev/loop100p1 -upassword -- /mnt
/user/kode/dislocker/src/metadata/datums.c:288:5: runtime error: index 21 out of bounds for type 'const char *[20]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /user/kode/dislocker/src/metadata/datums.c:288:5 in
=================================================================
==147051==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fa609c9d4e8 at pc 0x7fa609c5c1fd bp 0x7ffc711f22e0 sp 0x7ffc711f22d8
READ of size 8 at 0x7fa609c9d4e8 thread T0
#0 0x7fa609c5c1fc in print_header /user/kode/dislocker/src/metadata/datums.c:288:5
#1 0x7fa609c5b92e in print_one_datum /user/kode/dislocker/src/metadata/datums.c:260:2
#2 0x7fa609c5d4c1 in print_datum_vmk /user/kode/dislocker/src/metadata/datums.c:447:3
#3 0x7fa609c5b993 in print_one_datum /user/kode/dislocker/src/metadata/datums.c:265:3
#4 0x7fa609c6e20c in print_data /user/kode/dislocker/src/metadata/print_metadata.c:247:3
#5 0x7fa609c60eaf in dis_metadata_initialize /user/kode/dislocker/src/metadata/metadata.c:265:2
#6 0x7fa609c4fa30 in dis_initialize /user/kode/dislocker/src/dislocker.c:188:8
#7 0x55e435d92d6e in main /user/kode/dislocker/src/dislocker-fuse.c:222:5
#8 0x7fa60986d54f in __libc_start_call_main (/lib64/libc.so.6+0x2954f) (BuildId: ad65a880a208f9831f1031675a3ef1792e67c2fc)
#9 0x7fa60986d608 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x29608) (BuildId: ad65a880a208f9831f1031675a3ef1792e67c2fc)
#10 0x55e435c9d424 in _start (/user/kode/dislocker/src/dislocker-fuse+0x1f424) (BuildId: 46d2c626e01bf3feeb7f40039b1af5bf2ed51062)
0x7fa609c9d4e8 is located 8 bytes to the right of global variable 'value_type_str' defined in '/user/kode/dislocker/src/metadata/datums.c:34:20' (0x7fa609c9d440) of size 160
SUMMARY: AddressSanitizer: global-buffer-overflow /user/kode/dislocker/src/metadata/datums.c:288:5 in print_header
Shadow bytes around the buggy address:
0x0ff54138ba40: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
0x0ff54138ba50: f9 f9 f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 f9 f9
0x0ff54138ba60: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
0x0ff54138ba70: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00
0x0ff54138ba80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0ff54138ba90: 00 00 00 00 00 00 00 00 00 00 00 00 f9[f9]f9 f9
0x0ff54138baa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff54138bab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff54138bac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff54138bad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff54138bae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==147051==ABORTING