agent: upgrade libseccomp to 0.3.0 to fix GHSA-2r23-gqr7-wr4h#321
Merged
ls-ggg merged 1 commit intoMay 20, 2026
Merged
Conversation
nix < 0.20.2 (Rust) has an out-of-bounds write in getgrouplist when a user belongs to more than 16 groups (GHSA-2r23-gqr7-wr4h). The nix 0.17.0 dependency was pulled in transitively via libseccomp 0.1.3 in agent/rustjail. Upgrade libseccomp from 0.1.3 to 0.3.0, which dropped the nix dependency entirely in favour of libseccomp-sys FFI. This removes nix 0.17.0 from the dependency tree and resolves the vulnerability. API changes required in rustjail/src/seccomp.rs for libseccomp 0.2+: - ScmpArgCompare::new() now takes a single datum (value_two is encoded inside ScmpCompareOp::MaskedEqual); updated get_rule_conditions(). - add_rule() no longer accepts Option<&[ScmpArgCompare]>; replaced with add_rule() for unconditional rules and add_rule_conditional() for conditional ones. - ScmpAction::Errno now holds i32 instead of u32; cast errno_ret. - Replaced deprecated get_syscall_from_name() with ScmpSyscall::from_name(). - Replaced deprecated set_no_new_privs_bit() with set_ctl_nnp(). - add_arch() now returns Ok(bool) instead of Ok(()); result ignored. Fixes: GHSA-2r23-gqr7-wr4h Signed-off-by: ls-ggg <335814617@qq.com>
Collaborator
Author
|
/cubebot |
|
Claude finished @ls-ggg's task in 1m 22s —— View job Code Review: libseccomp 0.1.3 → 0.3.0 upgradeI've reviewed the changes across all 3 modified files. Here's the assessment: What was done
Verification
seccomp.rs changes — correctness check
One minor observationIn let cond = match ScmpCompareOp::from_str(&arg.op)? {
ScmpCompareOp::MaskedEqual(_) =>
ScmpArgCompare::new(arg.index, ScmpCompareOp::MaskedEqual(arg.value_two), arg.value),
op => ScmpArgCompare::new(arg.index, op, arg.value),
};This avoids creating a temporary that is immediately dropped. However, the current code is functionally correct — purely a style preference. OverallThe PR is well-structured and correctly addresses all the API changes between libseccomp 0.1.3 and 0.3.0. The vulnerable nix 0.17.0 transitive dependency is eliminated. No issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nix < 0.20.2 (Rust) has an out-of-bounds write in getgrouplist when a user belongs to more than 16 groups (GHSA-2r23-gqr7-wr4h). The nix 0.17.0 dependency was pulled in transitively via libseccomp 0.1.3 in agent/rustjail.
Upgrade libseccomp from 0.1.3 to 0.3.0, which dropped the nix dependency entirely in favour of libseccomp-sys FFI. This removes nix 0.17.0 from the dependency tree and resolves the vulnerability.
API changes required in rustjail/src/seccomp.rs for libseccomp 0.2+:
Fixes: GHSA-2r23-gqr7-wr4h