Skip to content

shmem_providers: replace unmaintained uds with std and unix-ancillary - #3947

Open
MohibShaikh wants to merge 2 commits into
AFLplusplus:mainfrom
MohibShaikh:shmem-providers-replace-uds
Open

MohibShaikh wants to merge 2 commits into
AFLplusplus:mainfrom
MohibShaikh:shmem-providers-replace-uds

Conversation

@MohibShaikh

Copy link
Copy Markdown

Description

Fixes #3932.

uds has had no release since 0.4.2 (2023-12-31), is no longer maintained (tormol/uds#29), and has open soundness reports (tormol/uds#30-#33).

  • Replace uds::UnixSocketAddr / bind_unix_addr / connect_to_unix_addr in crates/shmem_providers/src/unix_shmem_server.rs with std::os::unix::net::SocketAddr (SocketAddrExt on Linux/Android for @-prefixed abstract names, from_pathname elsewhere) and add unit tests for pathname and abstract-namespace parsing.
  • Replace uds SCM_RIGHTS send/receive with unix-ancillary (0.6.3, default features / libc-only, OwnedFd/BorrowedFd, FD_CLOEXEC, SIGPIPE-safe, zero-alloc sends). Disclosure: I maintain unix-ancillary.
  • Remove the unused uds dependency from crates/libafl_bolts/Cargo.toml.

Verified with cargo test -p shmem_providers (default and --all-features), cargo clippy -p shmem_providers -p libafl_bolts --no-deps --tests --all-features -- -D warnings, cargo +nightly fmt --check, no_std checks, and cross-target checks for aarch64-apple-darwin, x86_64-unknown-freebsd, and aarch64-linux-android.

Checklist

  • I have checked formatting (cargo +nightly fmt) and clippy on shmem_providers and libafl_bolts

uds has had no release since 0.4.2 (2023-12-31) and has open soundness
reports (tormol/uds#30-AFLplusplus#33).

- Abstract and path socket addresses use std (SocketAddrExt, Rust 1.70+).
- SCM_RIGHTS send/receive uses unix-ancillary; received fds are handed to
  the inner provider exactly as before.
- Drop the unused uds dependency from libafl_bolts.
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.

shmem_providers: replace unmaintained uds dependency

1 participant