Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@joachimmetz
Copy link
Contributor

No description provided.

@joachimmetz
Copy link
Contributor Author

@bcarrier @rcordovano PTAL

@joachimmetz joachimmetz changed the title Fix for OOB read in APFSJObject::add_entry #2802 Fix for OOB read in APFSJObject::add_entry #2802, #2804 Feb 11, 2023
@lfcnassif
Copy link
Contributor

lfcnassif commented Feb 16, 2023

Hi @joachimmetz. I'm testing this on some APFS images. For the 2 I've tested until now, it seems to freeze FS transversal at the very beginning, not sure if it is forever or if it became very slow at some point, I canceled the decoding after some dozens of minutes.

@joachimmetz
Copy link
Contributor Author

any test image you can share? or test case to reproduce as part of https://github.com/dfirlabs/apfs-specimens? The thing is there are no unit tests for TSK and I use its APFS functionality VERY SPORADIC.

@lfcnassif
Copy link
Contributor

Unfortunately they are real case images... I'm not experienced with C code debugging, but If you could point me some tutorial to get some thread dump/stacktrace at the freezing point, I can try to execute the procedure.

@joachimmetz
Copy link
Contributor Author

joachimmetz commented Feb 16, 2023

one option is to use fls -v (with and without patches) and see where it errors and then use fsapfsinfo with debug info to see what data structures TSK might no longer be fully parsing.

I'm not experienced with C code debugging,

this highly depends on the coding style as well, TSK APFS is C++ heavy with use of templating, so hard to debug (and maintain)

@simsong
Copy link
Member

simsong commented Sep 8, 2024

Can you rebase this with the current develop and trigger the self-tests?

@simsong simsong marked this pull request as draft September 8, 2024 18:14
@joachimmetz
Copy link
Contributor Author

rebased with develop branch

@joachimmetz
Copy link
Contributor Author

@simsong PTAL if/how these changes can provide better error condition feedback to the user

@codecov
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.64%. Comparing base (4bda7cd) to head (1dfe072).

Files with missing lines Patch % Lines
tsk/fs/apfs_fs.cpp 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2803   +/-   ##
========================================
  Coverage    31.64%   31.64%           
========================================
  Files          192      192           
  Lines        43149    43151    +2     
========================================
+ Hits         13653    13655    +2     
  Misses       29496    29496           
Flag Coverage Δ
unittests 31.64% <0.00%> (+<0.01%) ⬆️
windows-mingw 31.64% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tsk/fs/apfs_fs.cpp 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants