Skip to content

adouble: avoid entry bounds overflow - #3219

Merged
andylemin merged 1 commit into
mainfrom
rdmark-appledouble-overflow
Aug 1, 2026
Merged

adouble: avoid entry bounds overflow#3219
andylemin merged 1 commit into
mainfrom
rdmark-appledouble-overflow

Conversation

@rdmark

@rdmark rdmark commented Jul 28, 2026

Copy link
Copy Markdown
Member

validate AppleDouble entry lengths with subtraction after checking the offset, preventing 32-bit addition from wrapping while preserving the resource-fork exception

Ref. GHSA-mhfg-rppv-24g6

Reported-by: Elias Hasas (@zer0d4y5)

validate AppleDouble entry lengths with subtraction after checking
the offset, preventing 32-bit addition from wrapping while preserving
the resource-fork exception

Ref. GHSA-mhfg-rppv-24g6

Reported-by: Elias Hasas (@zer0d4y5)
Signed-off-by: Daniel Markstedt <daniel@mindani.net>
@rdmark
rdmark requested a review from a team July 28, 2026 18:46
@rdmark
rdmark requested a review from andylemin as a code owner July 28, 2026 18:46
@augmentcode

augmentcode Bot commented Jul 28, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Hardens AppleDouble entry parsing by validating entry lengths using subtraction after the offset check, avoiding 32-bit wraparound.
Why: Prevents bounds-check overflow issues (ref. GHSA-mhfg-rppv-24g6) while preserving the existing resource-fork (ADEID_RFORK) exception.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

📊 Performance Dashboard

Commit: 767e231c8eaf79aa056e5d75f3de56bb26dec793

🔥 Spectest (AFP 3.4) - FlameGraph

Netatalk Code-time: 1.9% · Runtime: 68s · Stacks: 1124

🔥 Click the preview to open the interactive flamegraph (zoom + search).

Flamegraph preview

🔝 Top 10 leaf functions
Function Samples
_raw_spin_unlock_irqrestore 347298525
do_syscall_64 124586455
__cp_end 68357170
x64_sys_call 47409005
afpd 47409005
srso_alias_safe_ret 35281120
find_get_block_common 33076050
file_close_fd 27563375
perf_syscall_enter 25358305
do_select 22050700

📈 Speedtest (AFP 3.4) - PerfGraph

Speedtest throughput

🔝 Throughputs per operation
Operation Peak mean (MB/s) avg mean (MB/s) avg max (MB/s)
Read 6681 4147 4374
Write 1829 580 983
Copy 2507 1533 1649
ServerCopy 3462 1718 1803

⏱️ Lantest (AFP 3.4) - LatencyGraph

Lantest latency

Avg total runtime: 10694 ms · Avg time per AFP op: 0.155 ms

🐢 All operations (avg runtime, in test order)
Test Avg (ms)
Writing one large file 27
Reading one large file 13
Creating 2000 files 1576
Open, write 1024 bytes, close 2000 files 273
Open, read 512 bytes, close 2000 files 239
Copying 2000 files client-side 2352
Copying 2000 files server-side 1931
Stat 2000 files 222
Enumerate dir with 2000 files 4
Lock then unlock 2000 open forks 118
Deleting 2000 files 1467
Byte-range lock/unlock 2000 ranges in one fork 125
Create directory tree with 1000 dirs 886
Directory cache hits (20 dirs x 100 files) 70
Mixed cache operations (create/stat/enum/delete) on 1000 files 1110
Deep path traversal (20 levels x 100 walks) 76
Cache validation (2000 files x 3 lookups) 205

@andylemin
andylemin merged commit 82cd3f6 into main Aug 1, 2026
63 of 64 checks passed
@rdmark
rdmark deleted the rdmark-appledouble-overflow branch August 1, 2026 10:31
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.

2 participants