Skip to content

fix(mountinfo): decode a trailing escape and \134 last - #1371

Merged
kvinwang merged 1 commit into
nextfrom
fix/mountinfo-single-pass-decode
Sep 24, 2026
Merged

kvinwang merged 1 commit into
nextfrom
fix/mountinfo-single-pass-decode

Conversation

@kvinwang

@kvinwang kvinwang commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Two small decoding bugs in the mountinfo readers:

  • dstack-volume: the bounds check (index + 3 < len) skipped an escape in the last four bytes, so a mount point ending in \040 was never decoded.
  • tee-simulator: \134 was replaced first, so a literal \040 in a path (emitted by the kernel as \134040) was decoded twice.

Verification

cd dstack
cargo test -p dstack-volume -p dstack-tee-simulator
cargo clippy -p dstack-volume -p dstack-tee-simulator --all-features -- -D warnings --allow unused_variables
cargo fmt --all -- --check

`dstack-volume`'s decoder skipped an escape in the last four bytes, so a
mount point ending in a space was never matched. The simulator's decoder
replaced `\134` first, so a path containing a literal `\040` was decoded
twice.
@kvinwang kvinwang changed the title fix(mountinfo): decode escapes in one pass in both mountinfo readers fix(mountinfo): decode a trailing escape and \134 last Sep 24, 2026
@kvinwang
kvinwang force-pushed the fix/mountinfo-single-pass-decode branch from 9472722 to f553893 Compare September 24, 2026 09:11
@kvinwang
kvinwang merged commit c91a832 into next Sep 24, 2026
12 checks passed
@kvinwang
kvinwang deleted the fix/mountinfo-single-pass-decode branch September 24, 2026 14:21
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.

1 participant