Comments (5)
I modified above issues, will request PR
And add additional found issues in this thread for all corrupted images.
from ntfsprogs-plus.
found some issue in corrupted image "paragon_ntfs_test1"
Direct leak of 4672 byte(s) in 46 object(s) allocated from:
#0 0x7fdd19617808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7fdd19497921 in ntfs_malloc /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/misc.c:57
#2 0x7fdd1946cd45 in ntfs_ie_dup /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:375
#3 0x7fdd19475d57 in ntfs_ih_takeout /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1848
#4 0x7fdd19476494 in ntfs_index_rm_leaf /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1941
#5 0x7fdd19477119 in ntfs_index_rm_node /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:2058
#6 0x7fdd194774de in ntfs_index_rm /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:2103
#7 0x559e3d390c69 in ntfsck_add_dir_list /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2281
#8 0x559e3d391a4d in ntfsck_scan_index_entries_btree /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2435
#9 0x559e3d391c87 in ntfsck_scan_index_entries /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2465
#10 0x559e3d3928d2 in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2683
#11 0x7fdd19224082 in __libc_start_main ../csu/libc-start.c:308
Direct leak of 104 byte(s) in 1 object(s) allocated from:
#0 0x7fdd19617808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7fdd19497921 in ntfs_malloc /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/misc.c:57
#2 0x7fdd1946cd45 in ntfs_ie_dup /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:375
#3 0x7fdd19475d57 in ntfs_ih_takeout /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1848
#4 0x7fdd19476120 in ntfs_ih_reparent_end /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1902
#5 0x7fdd194764f8 in ntfs_index_rm_leaf /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1956
#6 0x7fdd194764dc in ntfs_index_rm_leaf /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1952
#7 0x7fdd19477665 in ntfs_index_rm /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:2117
#8 0x559e3d390c69 in ntfsck_add_dir_list /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2281
#9 0x559e3d391a4d in ntfsck_scan_index_entries_btree /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2435
#10 0x559e3d391c87 in ntfsck_scan_index_entries /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2465
#11 0x559e3d3928d2 in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2683
#12 0x7fdd19224082 in __libc_start_main ../csu/libc-start.c:308
Direct leak of 104 byte(s) in 1 object(s) allocated from:
#0 0x7fdd19617808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7fdd19497921 in ntfs_malloc /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/misc.c:57
#2 0x7fdd1946cd45 in ntfs_ie_dup /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:375
#3 0x7fdd19475d57 in ntfs_ih_takeout /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1848
#4 0x7fdd19476120 in ntfs_ih_reparent_end /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1902
#5 0x7fdd194764f8 in ntfs_index_rm_leaf /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:1956
#6 0x7fdd19477119 in ntfs_index_rm_node /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:2058
#7 0x7fdd194774de in ntfs_index_rm /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/index.c:2103
#8 0x559e3d390c69 in ntfsck_add_dir_list /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2281
#9 0x559e3d391a4d in ntfsck_scan_index_entries_btree /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2435
#10 0x559e3d391c87 in ntfsck_scan_index_entries /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2465
#11 0x559e3d3928d2 in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2683
#12 0x7fdd19224082 in __libc_start_main ../csu/libc-start.c:308
from ntfsprogs-plus.
found memory leaks (revive_orphan_mft_entry image)
==869630==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1360 byte(s) in 10 object(s) allocated from:
#0 0x7f9ba0caca06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
#1 0x7f9ba0b2c8de in ntfs_calloc /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/misc.c:47
#2 0x7f9ba0b0e25b in __ntfs_inode_allocate /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/inode.c:95
#3 0x7f9ba0b0e494 in ntfs_inode_real_open /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/inode.c:171
#4 0x7f9ba0b10601 in ntfs_inode_open /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/inode.c:486
#5 0x562e87a04f52 in ntfsck_verify_mft_record /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:763
#6 0x562e87a0ede8 in ntfsck_check_mft_records /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2468
#7 0x562e87a0f924 in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2676
#8 0x7f9ba08b9082 in __libc_start_main ../csu/libc-start.c:308
Indirect leak of 10240 byte(s) in 10 object(s) allocated from:
#0 0x7f9ba0cac808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7f9ba0b2c947 in ntfs_malloc /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/misc.c:57
#2 0x7f9ba0b239d1 in ntfs_file_record_read /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/mft.c:439
#3 0x7f9ba0b0e4c0 in ntfs_inode_real_open /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/inode.c:174
#4 0x7f9ba0b10601 in ntfs_inode_open /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/inode.c:486
#5 0x562e87a04f52 in ntfsck_verify_mft_record /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:763
#6 0x562e87a0ede8 in ntfsck_check_mft_records /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2468
#7 0x562e87a0f924 in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2676
#8 0x7f9ba08b9082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: 11600 byte(s) leaked in 20 allocation(s).
from ntfsprogs-plus.
found buffer overflow (paragon_ntfs_test3)
==912463==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x615000001180 at pc 0x7f48601e1dbe bp 0x7fff3fa8beb0 sp 0x7fff3fa8bea0
READ of size 1 at 0x615000001180 thread T0
#0 0x7f48601e1dbd in ntfs_bit_get /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/bitmap.c:78
#1 0x560e686621c2 in ntfsck_mft_bmp_bit_get /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:208
#2 0x560e68664f71 in ntfsck_verify_mft_record /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:767
#3 0x560e6866ede0 in ntfsck_check_mft_records /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2474
#4 0x560e6866f91c in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2682
#5 0x7f485ffbe082 in __libc_start_main ../csu/libc-start.c:308
#6 0x560e68661c4d in _start (/home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/.libs/ntfsck+0x7c4d)
0x615000001180 is located 0 bytes to the right of 512-byte region [0x615000000f80,0x615000001180)
allocated by thread T0 here:
#0 0x7f48603b1a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
#1 0x7f48602318de in ntfs_calloc /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/misc.c:47
#2 0x560e6866f1c6 in ntfsck_mount /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2538
#3 0x560e6866f817 in main /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/src/ntfsck.c:2667
#4 0x7f485ffbe082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/pinocc/Projects/filesystems/ntfs/ntfsprogs/libntfs-3g/bitmap.c:78 in ntfs_bit_get
Shadow bytes around the buggy address:
0x0c2a7fff81e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a7fff81f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff8200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff8210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff8220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c2a7fff8230:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a7fff8240: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2a7fff8250: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2a7fff8260: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2a7fff8270: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c2a7fff8280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
Shadow gap: cc
==912463==ABORTING
from ntfsprogs-plus.
It may be resolved in #36
from ntfsprogs-plus.
Related Issues (20)
- set index end entry or index end flags if vcn of index entry is invalid
- initialize and remove all index root and index allocation if index block or sizes(alloc, init, data) are invalid
- Two mft cluster runs are pointing same lcn cluster number. HOT 2
- data variables of non-resident of normal file are corrupted HOT 4
- github action of linux-ntfs cannot clone ntfsprogs HOT 1
- mapping offset of non-resident of normal directory/file are corrupted HOT 1
- How to fix when attribute order corrupted.
- ntfsck recognizes external mft entry as an orphan HOT 2
- After checking filesystem with ntfsck, some issues are still remained. HOT 2
- link_count and FILENAME_ATTR(hard link?)
- Check Reparse tag validation code again
- LCN bitmap & MFT bitmap buffer size optimization
- don't check anything if volume dirty flags check option is used HOT 1
- fixup array corruption HOT 1
- in case that entries_offset of index root has a large or corrupted value, illegal memory access occurs.
- check fsck and mkfs on 4K Native HDD
- aggressive readahead
- core usage is 100% even after a disk is unplugged HOT 1
- how to handle compression and encryption file in fsck ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntfsprogs-plus.