[Bug 2137745] [NEW] Ubuntu patch prevents custom argv[0]

Etienne 2137745 at bugs.launchpad.net
Fri Jan 9 00:11:29 UTC 2026


Public bug reported:

On Ubuntu 24.04.03 starting e.g. `true` with a custom argv[0] works:

```
ecordonnier at LBM9V6C4:~/dev/coreutils$ bash -c "exec -a foobar
/usr/lib/cargo/bin/coreutils/true"
foobar 0.0.24 (multi-call binary)

Usage: foobar [function [arguments...]]

Currently defined functions:

    [, arch, b2sum, b3sum, base32, base64, basename, basenc, cat,
chcon, chgrp, chmod, chown,
    chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir,
dircolors, dirname, du, echo,
...
...
```
    
On Ubuntu 26.04 (development branch) it doesn't work:
```
asteba at asteba-MS-7C75:~$ /usr/lib/cargo/bin/coreutils/true --version
/usr/lib/cargo/bin/coreutils/true (uutils coreutils) 0.2.2

asteba at asteba-MS-7C75:~$ bash -c "exec -a foobar /usr/lib/cargo/bin/coreutils/true"
Security violation: Requested utility `foobar` does not match executable name:
  /usr/lib/cargo/bin/coreutils/true
```

It works with GNU coreutils however:

```
asteba at asteba-MS-7C75:~/dev$ bash -c "exec -a foobar /usr/bin/gnutrue"
asteba at asteba-MS-7C75:~/dev$ 
```

The error "Security Violation..." comes from a Ubuntu patch (
https://git.launchpad.net/ubuntu/+source/rust-
coreutils/tree/debian/patches/require-utility-to-be-invoked-at-matching-
path.patch?h=applied/ubuntu/devel ):

```
asteba at asteba-MS-7C75:~/dev/coreutils/ubuntu-sources$ rg -i "security violation" .
./rust-coreutils-0.2.2/debian/patches/require-utility-to-be-invoked-at-matching-path.patch
27:+                    "Security violation: Requested utility `{}` does not match executable name:\n  {}",

./rust-coreutils-0.2.2/src/bin/coreutils.rs
116:                    "Security violation: Requested utility `{}` does not match executable name:\n  {}",

```

@julian-klode FYI

** Affects: rust-coreutils (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  Ubuntu patch prevents custom argv[0]

Status in rust-coreutils package in Ubuntu:
  New

Bug description:
  On Ubuntu 24.04.03 starting e.g. `true` with a custom argv[0] works:

  ```
  ecordonnier at LBM9V6C4:~/dev/coreutils$ bash -c "exec -a foobar
  /usr/lib/cargo/bin/coreutils/true"
  foobar 0.0.24 (multi-call binary)

  Usage: foobar [function [arguments...]]

  Currently defined functions:

      [, arch, b2sum, b3sum, base32, base64, basename, basenc, cat,
  chcon, chgrp, chmod, chown,
      chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir,
  dircolors, dirname, du, echo,
  ...
  ...
  ```
      
  On Ubuntu 26.04 (development branch) it doesn't work:
  ```
  asteba at asteba-MS-7C75:~$ /usr/lib/cargo/bin/coreutils/true --version
  /usr/lib/cargo/bin/coreutils/true (uutils coreutils) 0.2.2

  asteba at asteba-MS-7C75:~$ bash -c "exec -a foobar /usr/lib/cargo/bin/coreutils/true"
  Security violation: Requested utility `foobar` does not match executable name:
    /usr/lib/cargo/bin/coreutils/true
  ```

  It works with GNU coreutils however:

  ```
  asteba at asteba-MS-7C75:~/dev$ bash -c "exec -a foobar /usr/bin/gnutrue"
  asteba at asteba-MS-7C75:~/dev$ 
  ```

  The error "Security Violation..." comes from a Ubuntu patch (
  https://git.launchpad.net/ubuntu/+source/rust-
  coreutils/tree/debian/patches/require-utility-to-be-invoked-at-
  matching-path.patch?h=applied/ubuntu/devel ):

  ```
  asteba at asteba-MS-7C75:~/dev/coreutils/ubuntu-sources$ rg -i "security violation" .
  ./rust-coreutils-0.2.2/debian/patches/require-utility-to-be-invoked-at-matching-path.patch
  27:+                    "Security violation: Requested utility `{}` does not match executable name:\n  {}",

  ./rust-coreutils-0.2.2/src/bin/coreutils.rs
  116:                    "Security violation: Requested utility `{}` does not match executable name:\n  {}",

  ```

  @julian-klode FYI

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2137745/+subscriptions




More information about the foundations-bugs mailing list