Supersedes attachment 6017702 as evidence for the revised source. Full
native Noble build passes; installed regression suite passes 46/46; ten
existing package test scripts pass. Both regression mutations fail as
expected. This is a locally built revised source, not the existing PPA
~ppa1; a new sponsor build and Ubuntu VM verification remain required.
The report records the exact source, tested build, environment and
limitations.

** Attachment added: "Revised Noble source validation: 46 cases and mutation 
checks (2026-11-13)"
   
https://bugs.launchpad.net/bugs/2166756/+attachment/6017726/+files/submission-test-results-revised.txt

** Description changed:

  Package: procps, Ubuntu 24.04 amd64
  Affected versions tested: 2:4.0.4-4ubuntu3.2 and 2:4.0.4-4ubuntu3.3
  
  [ Impact ]
  
  Without `--`, procps `kill` truncates a negative PID to its first digit.
  Arguments `-TERM -1443247` therefore target PID -1, signaling all permitted
  processes instead of group 1443247. This can terminate a desktop session 
during
  ordinary process-group cleanup.
  
  A test-cleanup incident led to this investigation. The original syscall was
  not recorded; the parsing defect was subsequently reproduced with signal
  delivery blocked.
  
  [ Test Plan ]
  
  On Noble with strace installed, run:
  
      /usr/bin/strace -e trace=kill -e inject=kill:error=EPERM
  /usr/bin/kill -0 -1443247
  
  The affected package reports `kill(-1, 0)`; the fixed package must report
  `kill(-1443247, 0)`. Signal 0 only checks permissions, and strace additionally
  blocks the syscall. Both traces should show EPERM and `(INJECTED)`.
  
  Run `python3 debian/tests/kill-negative-pids` against the installed package.
- All 18 cases must pass. They cover single- and multi-digit targets, following
- operands, signal options, explicit `--`, positive PIDs, and malformed input.
+ All 46 cases must pass with the revised test. They cover single- and 
multi-digit
+ targets, following operands, signal options, explicit `--`, positive PIDs, 
malformed
+ input, and negative queue values with both attached and separate options. Both
+ kill and rt_sigqueueinfo interception are validated before negative-target 
probes.
+ Queue cases run with and without POSIXLY_CORRECT.
  
- Local results: amd64 package build succeeds; 133 existing checks pass, three
- are untested and one is unsupported. All 12 autopkgtests pass, including the
- 18-case test; stack-limit is marked superficial. Testing used a Noble 
container
- with an init process and a Bash parent. Detailed logs are available.
+ Revised source validation, 2026-11-13: native Noble amd64 package build passes
+ 126 DejaGNU and 7 Automake checks (3 untested, 5 unsupported). The installed
+ package passes all 46 regression cases and ten existing package test scripts.
+ Testing used a disposable Noble container with an init process. 
sysctl-defaults
+ and a complete VM autopkgtest run remain for Ubuntu infrastructure.
+ 
+ The existing PPA version 2:4.0.4-4ubuntu3.4~ppa1 contains the earlier guard. 
Its
+ original 18-case result does not cover the queue-value collision found during
+ further review. A revised sponsor build is required; do not treat ~ppa1 as
+ validation of the revised patch.
  
  [ Where problems could occur ]
  
  Selecting the wrong argv entry could reject a valid PID or signal another
  target. The upstream fix alone has this problem for single-digit operands:
  `-0 -2` is rejected, and `-0 -1 123` targets 123. The backport accounts for
  getopt_long advancing past a complete single-digit option. Both cases are 
tested.
+ 
+ Recovery must also distinguish an actual one-digit PID from a consumed option
+ value. For example, `-0 -q -1 -123` must retain target -123, while
+ `-0 -q -1 -1` must retain target -1. The revised guard records optind before
+ each getopt_long call and only recovers a matching token consumed by that 
call.
+ Restoring the earlier guard fails eight new queue tests; removing single-digit
+ recovery fails twelve cases; restoring the revised source passes all 46.
  
  The existing early exit after the first negative target is preserved.
  
  [ Other Info ]
  
  Based on [upstream commit 
bfbaf43](https://gitlab.com/procps-ng/procps/-/commit/bfbaf43acade8c9de38737e87f4fc535991c8359)
  ([issue 354](https://gitlab.com/procps-ng/procps/-/issues/354)), with the 
single-digit
  adjustment described above. The multi-digit fix is already present in the
  inspected Resolute source; Noble's 2:4.0.4-4ubuntu3.3 still lacks it.
+ 
+ Upstream single-digit correction and regression tests:
+ https://gitlab.com/procps-ng/procps/-/merge_requests/312

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166756

Title:
  [Noble SRU] procps kill truncates negative PIDs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/procps/+bug/2166756/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to