Package: util-linux / 2.36.1-8+deb11u2

Metadata

Package Version Patches format
util-linux 2.36.1-8+deb11u2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
upstream/upstream_build sys do not build plymouth ctrl.c w disabled pl.patch | (download)

login-utils/Makemodule.am | 6 4 + 2 - 0 !
term-utils/Makemodule.am | 6 4 + 2 - 0 !
2 files changed, 8 insertions(+), 4 deletions(-)

 [patch] build-sys: do not build plymouth-ctrl.c w/ disabled plymouth

Do not build plymouth-ctrl.c in agetty and sulogin in case the plymouth
support is disabled.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>

upstream/upstream_hwclock do not assume __NR_settimeofday_time32.patch | (download)

sys-utils/hwclock.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] hwclock: do not assume __nr_settimeofday_time32

Check that __NR_settimeofday_time32 exists before trying to use it as
syscall number.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>

upstream/0001 libmount don t use symfollow for helpers on user mou.patch | (download)

libmount/src/context_mount.c | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 [patch] libmount: don't use "symfollow" for helpers on user mounts

Addresses: https://github.com/karelzak/util-linux/issues/1193
Signed-off-by: Karel Zak <kzak@redhat.com>

upstream/Manual pages document the resize command.patch | (download)

disk-utils/cfdisk.8 | 9 9 + 0 - 0 !
1 file changed, 9 insertions(+)

 manual pages: document the 'resize' command

Reported in https://bugs.debian.org/906918, https://bugs.debian.org/915971.

Signed-off-by: Vincent McIntyre <vincent.mcintyre@csiro.au>

debian/man getopt examples.patch | (download)

misc-utils/getopt.1 | 3 1 + 2 - 0 !
1 file changed, 1 insertion(+), 2 deletions(-)

 util-linux: getopt(1) should point to where examples are on a debian
 system

Debian BTS #913049

debian/verbose tests.patch | (download)

tests/Makemodule.am | 2 1 + 1 - 0 !
tests/functions.sh | 11 11 + 0 - 0 !
2 files changed, 12 insertions(+), 1 deletion(-)

 verbose-tests

Enable verbose tests and print content of failing tests output file.

upstream/libmount do not canonicalize ZFS source dataset.patch | (download)

libmount/src/context.c | 7 6 + 1 - 0 !
1 file changed, 6 insertions(+), 1 deletion(-)

 libmount: do not canonicalize zfs source dataset

Fixes: https://github.com/karelzak/util-linux/issues/1231
Addresses: https://github.com/systemd/systemd/issues/18188
Addresses: https://github.com/openzfs/zfs/pull/11295
Signed-off-by: Karel Zak <kzak@redhat.com>

upstream/libmount allow read only for not root users.patch | (download)

libmount/src/context.c | 31 24 + 7 - 0 !
1 file changed, 24 insertions(+), 7 deletions(-)

 libmount: allow --read-only for not-root users

The command "mount -r" was supported for non-root users in very old
mount(8) versions. Unfortunately, in this case libmount replaces all
mount options from command line by options from fstab. We need
exception for MS_RDONLY.

Fixes: https://github.com/karelzak/util-linux/issues/1235
Signed-off-by: Karel Zak <kzak@redhat.com>

upstream/CVE 2021 37600 sys utils ipcutils be careful when call calloc.patch | (download)

sys-utils/ipcutils.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 sys-utils/ipcutils: be careful when call calloc() for uint64 nmembs

Fix: https://github.com/karelzak/util-linux/issues/1395
Signed-off-by: Karel Zak <kzak@redhat.com>

debian/backport ul_strtou64 function.patch | (download)

include/strutils.h | 2 2 + 0 - 0 !
lib/strutils.c | 14 14 + 0 - 0 !
2 files changed, 16 insertions(+)

 include/strutils: add ul_strtou64() function
upstream/libmount fix UID check for FUSE umount CVE 2021 3995.patch | (download)

include/strutils.h | 2 1 + 1 - 0 !
libmount/src/context_umount.c | 14 3 + 11 - 0 !
libmount/src/mountP.h | 1 1 + 0 - 0 !
libmount/src/optstr.c | 42 42 + 0 - 0 !
4 files changed, 47 insertions(+), 12 deletions(-)

 [patch 1/2] libmount: fix uid check for fuse umount [cve-2021-3995]

Improper UID check allows an unprivileged user to unmount FUSE
filesystems of users with similar UID.

Signed-off-by: Karel Zak <kzak@redhat.com>

upstream/libmount fix deleted suffix issue CVE 2021 3996.patch | (download)

libmount/src/tab_parse.c | 5 0 + 5 - 0 !
tests/expected/findmnt/filter-options | 1 0 + 1 - 0 !
tests/expected/findmnt/filter-options-nameval-neg | 3 1 + 2 - 0 !
tests/expected/findmnt/filter-types-neg | 1 0 + 1 - 0 !
tests/expected/findmnt/outputs-default | 3 1 + 2 - 0 !
tests/expected/findmnt/outputs-force-tree | 3 1 + 2 - 0 !
tests/expected/findmnt/outputs-kernel | 3 1 + 2 - 0 !
tests/expected/libmount/tabdiff-mount | 1 0 + 1 - 0 !
tests/expected/libmount/tabdiff-move | 1 0 + 1 - 0 !
tests/expected/libmount/tabdiff-remount | 1 0 + 1 - 0 !
tests/expected/libmount/tabdiff-umount | 1 0 + 1 - 0 !
tests/expected/libmount/tabfiles-parse-mountinfo | 11 0 + 11 - 0 !
tests/expected/libmount/tabfiles-py-parse-mountinfo | 11 0 + 11 - 0 !
tests/ts/findmnt/files/mountinfo | 1 0 + 1 - 0 !
tests/ts/findmnt/files/mountinfo-nonroot | 1 0 + 1 - 0 !
tests/ts/libmount/files/mountinfo | 1 0 + 1 - 0 !
16 files changed, 4 insertions(+), 44 deletions(-)

 [patch 2/2] libmount: fix (deleted) suffix issue [cve-2021-3996]

This issue is related to parsing the /proc/self/mountinfo file allows an
unprivileged user to unmount other user's filesystems that are either
world-writable themselves or mounted in a world-writable directory.

The support for "(deleted)" is no more necessary as the Linux kernel does
not use it in /proc/self/mountinfo and /proc/self/mount files anymore.

Signed-off-by: Karel Zak <kzak@redhat.com>

upstream/write correctly handle wide characters.patch | (download)

include/carefulputc.h | 62 45 + 17 - 0 !
login-utils/last.c | 4 1 + 3 - 0 !
term-utils/write.c | 25 7 + 18 - 0 !
3 files changed, 53 insertions(+), 38 deletions(-)

 write: correctly handle wide characters
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Do this by replacing fputc_careful() (notice that the description said
it's locale-aware  it very much is /not/), with a fputs_careful() which
does the same thing, but if it were to output a byte in the \123 format,
first it checks whether this byte starts a valid multibyte character.

If it does, and that character is printable, write it verbatim.
This means that
  echo 'foo   bar' | write nabijaczleweli pts/4
instead of
  foo \303\245\303\244\303\266
  \304\205\304\231\304\207\305\272\305\274\305\204 bar
yields
  foo   bar
or, more realistically, from a message I got earlier today,
  Filip powiedzia\305\202 \305\274e zap\305\202aci jutro
becomes
  Filip powiedzia e zapaci jutro

Invalid/non-printable sequences get processed as before.

Line reading in write must become getline() to avoid dealing with
partial characters: for example on input consisting solely of
, where every {1} is an instance, the output would be
  {42}\305\272{84}\305\274{84}\305\204{39}
with just fixed-512 fgets()

Bug-Debian: https://bugs.debian.org/826596

upstream/wall convert homebrew buffering to open_memstream.patch | (download)

term-utils/wall.c | 94 20 + 74 - 0 !
1 file changed, 20 insertions(+), 74 deletions(-)

 wall: convert homebrew buffering to open_memstream()
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

The struct buffer system duplicates a plethora of standard I/O
functions (including a fork of fputc_careful())
and adds a lot of complexity  open_memstream() is standard,
and fits perfectly into this niche

upstream/wall use fputs_careful.patch | (download)

include/carefulputc.h | 42 33 + 9 - 0 !
login-utils/last.c | 2 1 + 1 - 0 !
term-utils/wall.c | 38 6 + 32 - 0 !
term-utils/write.c | 2 1 + 1 - 0 !
4 files changed, 41 insertions(+), 43 deletions(-)

 wall: use fputs_careful()

LINE_MAX only applies to teletypes in canonical mode: when stdin is a
file, it could still very much tear; start off at 512 for the sprintf(),
then use getline() like in write.

The line wrapping has one suboptimal edge-case:
  $ wall < all

  Broadcast message from nabijaczleweli@tarta (pts/4) (Tue Mar 14 22:31:25
  2023):

  ^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^^^_
  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ
  KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~^?\200\201\202\203\204\205\206
  \207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232
  \233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256
  \257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302
  \303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326
  \327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352
  \353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376
  \377
but that's a pathological input, and the result is still infinitely
better than it was before, so fixing that is more trouble than it's
worth.

Bug-Debian: https://bugs.debian.org/826596

upstream/wall fix calloc cal Werror calloc transposed args.patch | (download)

term-utils/wall.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 wall: fix calloc cal [-werror=calloc-transposed-args]

term-utils/wall.c:143:37: error: xcalloc sizes specified with sizeof in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  143 |         buf->groups = xcalloc(sizeof(*buf->groups), buf->ngroups);
      |                                     ^
term-utils/wall.c:143:37: note: earlier argument should specify number of elements, later size of each element

Signed-off-by: Karel Zak <kzak@redhat.com>

upstream/wall fix escape sequence Injection CVE 2024 28085.patch | (download)

term-utils/wall.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 wall: fix escape sequence injection [cve-2024-28085]

Let's use for all cases the same output function.

Reported-by: Skyler Ferrante <sjf5462@rit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>