Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libatalk: fix parsing of macOS created AppleDouble files #575

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

rdmark
Copy link
Member

@rdmark rdmark commented Dec 3, 2023

header_len is just AD_DATASZ_OSX which is 82. Pass the size of the AppleDouble file to parse_entries() so the bound checks correctly work with the file size, not just the header size.

With an FinderInfo AppleDouble entry that contains embedded xattrs, the FinderInfo entry will be much larger then 32 bytes, typically it looks like this:

Entry ID : 00000009 : Finder Info
Offset : 00000032 : 50
Length : 00000EB0 : 3760

As offset + length is bigger then FinderInfo, parse_entries() fails the validation.

Signed-off-by: Ralph Boehme [email protected]
Reviewed-by: Daniel Markstedt [email protected]

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
header_len is just AD_DATASZ_OSX which is 82. Pass the size of the AppleDouble
file to parse_entries() so the bound checks correctly work with the file size,
not just the header size.

With an FinderInfo AppleDouble entry that contains embedded xattrs, the
FinderInfo entry will be much larger then 32 bytes, typically it looks like
this:

Entry ID   : 00000009 : Finder Info
Offset     : 00000032 : 50
Length     : 00000EB0 : 3760

As offset + length is bigger then FinderInfo, parse_entries() fails the
validation.

Signed-off-by:    Ralph Boehme <[email protected]>
Reviewed-by:      Daniel Markstedt <[email protected]>
@rdmark rdmark requested review from slowfranklin and a user December 3, 2023 23:10
Copy link

sonarqubecloud bot commented Dec 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

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.

None yet

2 participants