Your message dated Tue, 25 Feb 2025 12:07:01 +0000
with message-id <[email protected]>
and subject line Bug#1098694: fixed in util-linux 2.40.4-5
has caused the Debian Bug report #1098694,
regarding Crash in agetty due to invalid strncmp call in Trixie
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1098694: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098694
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: util-linux
Version: 2.40.4-3
Severity: important

Dear Maintainer,

this is the first bug report I'm sending, so I hope all the formatting is correct.

I am running Debian Trixie in a Proxmox VM. I noticed that on the login screen there are errors of agetty crashing with a segfault. There's nothing special about the VM, it's a blank VM running the daily cloud images of Debian Trixie.

The VM is running Linux 6.12.12-1 with util-linux 2.40.4-3 and libc6 2.40-7.

I debugged this with ltrace and believe I found the error, or at least some invalid behaviour.

In agetty.c in the debian sources for util-linux, right at the end of the function parse_args, there's code that tries to figure out the terminal name using a call to get_terminal_name. For some reason, this function call seems to fail on my machine and it prints the error "could not get terminal name".

This causes it to set &op->tty to NULL, and unfortunately, a couple lines later, that variable is used in a strncmp call, causing it to crash.

Here's the corresponding lines from the ltrace log:

strtok(nil, ",")                                 = nil
free(0x557c64154be0)                             = <void>
strcmp("-", "-")                                 = 0
isatty(0)                                        = 0
isatty(1)                                        = 0
isatty(2)                                        = 0
dcgettext(nil, "could not get terminal name: %d", 5) = "could not get terminal name: %d"
openlog("agetty", 1, 80)                         = <void>
__vsyslog_chk(4, 1, 0x557c2a49d4d8, 0x7ffda1325e40) = 0
closelog()                                       = <void>
strncmp(nil, "tty", 3 <no return ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++


I can provide the full ltrace log and/or a crash dump file if necessary - what's the best way to provide these? Upload at a filehoster and send the link in response to this bug report?

Unfortunately, I was not yet able to figure out why on my machine the code seems to run into this code path with the "could not get terminal name" warning. But nevertheless, it's a valid code path, and it's just a warning not an error, so the code that comes after it should be able to handle this without crashing.

Best regards,
Florian

--- End Message ---
--- Begin Message ---
Source: util-linux
Source-Version: 2.40.4-5
Done: Chris Hofstaedtler <[email protected]>

We believe that the bug you reported is fixed in the latest version of
util-linux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Hofstaedtler <[email protected]> (supplier of updated util-linux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 25 Feb 2025 11:34:50 +0100
Source: util-linux
Architecture: source
Version: 2.40.4-5
Distribution: unstable
Urgency: medium
Maintainer: util-linux packagers <[email protected]>
Changed-By: Chris Hofstaedtler <[email protected]>
Closes: 1098694
Changes:
 util-linux (2.40.4-5) unstable; urgency=medium
 .
   * Apply upstream patch to avoid agetty crash (Closes: #1098694)
Checksums-Sha1:
 d55c0d19ccce6915a74b22d4f8d929efc5a52bc5 4994 util-linux_2.40.4-5.dsc
 98bdc8c3eade7d640b611a2a513ed17ef85a03d0 118424 
util-linux_2.40.4-5.debian.tar.xz
 ab23f95217fea1827159ad05a34b767f083d092a 22315 
util-linux_2.40.4-5_arm64.buildinfo
Checksums-Sha256:
 beade6c6fe38be1e45e18ef20a830eb9e090ba75d3235f6feb53f8b310812a04 4994 
util-linux_2.40.4-5.dsc
 1e76c71ae8adccf8b70473945e1ec6f8e88bc562447bcada5dfad0455fe11794 118424 
util-linux_2.40.4-5.debian.tar.xz
 8e09522419b03c850b286b65544ed167c6497a78438772abaa13b5025c6addc1 22315 
util-linux_2.40.4-5_arm64.buildinfo
Files:
 6e019cf219874003fa97edc11dcad9ab 4994 utils required util-linux_2.40.4-5.dsc
 c8047f41b1af3d68dcb61e0d7e4973f9 118424 utils required 
util-linux_2.40.4-5.debian.tar.xz
 0746aa9c518d5d9a47c0f689a73f52bb 22315 utils required 
util-linux_2.40.4-5_arm64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfRrP+tnggGycTNOSXBPW25MFLgMFAme9rqcACgkQXBPW25MF
LgPrAw/8C0J3W9UFdutJWZz6gINijgGtTZY7TPV4l4+sF997xKFTnLL+Xv6A23MA
8LO0M/5bDqmvhgGBP7/pUwjrarSvQ/tqUeoWTDKQur6vDgezUE9lQBdvezItFo8O
abycuIipkWar60WeahuOJFd3lJrUOF0rb0TH7kWsax1/QTfotELqcyQ3vsHblGcg
PANQmQLsuV5/eTlkgotxS+4Np1tWNh3byfYti0nPJCJ4Wmw+JOIG5w0AGFj+w6Y1
lzUQOPxZpPIHnqjitrpPDcW6W5rP5VPBdUd2nLmq3bjVPuOlSTBXaQCFRRezvJv2
CMxUvkaOmcOUCU2v9m5EGma/MDaJbYieJAa745MrPlA5nsQVW47XojcqkrqX9Dq8
7qmYvPh8PoaoHCb+TO24uI7IceYOhOAVdxrbyZGqgL9mXLMJUny+RKvVkG0NvlOe
BGhGTwvDvgmOFOFVa2owNaUvAjeOD2G/tM6Ut8m+kw0x3ZzcOwbulg+nqEfizIGM
y9RK/9zCYqb31dim5tVz871n1nkSMnH01X1tmQCpWSjnpXmNYkGMrN7bmACW+u5q
kSYHdSUIqzdFICMRR6prLTvYrqQTPXptfHRpPuRpIaCY3+jnB3KzUks/G1Q6lnOe
+VDlIglaZPz3NLlPjONv4rZdhtIw2i4HSMku+9ZFAUUQQ2GVhF0=
=kn+a
-----END PGP SIGNATURE-----

Attachment: pgp8IMjNKN0eb.pgp
Description: PGP signature


--- End Message ---

Reply via email to