Debian Bug report logs - #990962
/usr/bin/mkfifo: -Z leaks previous context into next directory without explicit label

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <[email protected]>; Source for coreutils is src:coreutils (PTS, buildd, popcon).

Reported by: наб <[email protected]>

Date: Sun, 11 Jul 2021 19:21:01 UTC

Severity: normal

Found in versions coreutils/8.30-3, coreutils/8.32-4

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Michael Stone <[email protected]>:
Bug#990962; Package coreutils. (Sun, 11 Jul 2021 19:21:03 GMT) (full text, mbox, link).


Acknowledgement sent to наб <[email protected]>:
New Bug report received and forwarded. Copy sent to Michael Stone <[email protected]>. (Sun, 11 Jul 2021 19:21:03 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: наб <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: /usr/bin/mkfifo: -Z leaks previous context into next directory without explicit label
Date: Sun, 11 Jul 2021 21:16:59 +0200
[Message part 1 (text/plain, inline)]
Package: coreutils
Version: 8.30-3
Severity: normal
File: /usr/bin/mkfifo

Dear Maintainer,

Consider the following case:
-- >8 --
# mkfifo -Z zupa
# mkfifo -Z /tmp/zupa
# ls -lZ zupa /tmp/zupa
prw-r--r--. 1 root root system_u:object_r:admin_home_t:s0   0 Jul 11 21:02 zupa
prw-r--r--. 1 root root unconfined_u:object_r:user_tmp_t:s0 0 Jul 11 21:02 /tmp/zupa
-- >8 --

Makes sense, as selinux_label(3) returns nothing for /tmp/zupa.

Now consider:
-- >8 --
# mkfifo -Z zupa /tmp/zupa
# ls -lZ zupa /tmp/zupa
prw-r--r--. 1 root root system_u:object_r:admin_home_t:s0 0 Jul 11 21:02 zupa
prw-r--r--. 1 root root system_u:object_r:admin_home_t:s0 0 Jul 11 21:02 /tmp/zupa
-- >8 --

As the kids say: oof, ouch, owie!

-- System Information:
Debian Release: 10.10
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-17-amd64 (SMP w/24 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages coreutils depends on:
ii  libacl1      2.2.53-4
ii  libattr1     1:2.4.48-4
ii  libc6        2.28-10
ii  libselinux1  2.8-1+b1

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Marked as found in versions coreutils/8.32-4. Request was from наб <[email protected]> to [email protected]. (Sun, 11 Jul 2021 19:27:05 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:52:26 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.