[Bug 1860548] Re: systemd crashes when logging long message
Dan Streetman
ddstreet at canonical.com
Wed Jan 22 20:01:04 UTC 2020
** Tags added: ddstreet-next
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1860548
Title:
systemd crashes when logging long message
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Bionic:
Confirmed
Status in systemd source package in Disco:
Fix Released
Status in systemd source package in Eoan:
Fix Released
Bug description:
[Description]
Systemd crashes when logging very long messages. This regression was introduced with
upstream commit d054f0a4d451 [1] due to xsprintf.
Commits e68eedbbdc98 [2] and 574432f889ce [3] replace some uses of xsprintf with
snprintf and fix it.
[Test Case]
# systemd-run --scope apt-get -q -y -o DPkg::Options::=--force-confold
-o DPkg::Options::=--force-confdef --allow-unauthenticated install acl
adduser amd64-microcode apt base-files base-passwd bash bash-
completion bind9-host binfmt-support binutils-common binutils-x86-64
-linux-gnu bsdmainutils bsdutils busybox-initramfs busybox-static
bzip2 ca-certificates console-setup console-setup-linux coreutils cpio
cpp cpp-7 crda cron curl dash dbus dctrl-tools debconf debconf-i18n
debianutils dictionaries-common diffutils dirmngr distro-info-data
dmeventd dmsetup dnsmasq-base dnsutils dpkg e2fslibs e2fsprogs ed
eject fakeroot fdisk file findutils friendly-recovery gawk gcc-7-base
gcc-8-base gettext-base gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils
gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep
groff-base grub-common grub-pc grub-pc-bin grub2-common gzip hostname
info init init-system-helpers initramfs-tools initramfs-tools-bin
initramfs-tools-core install-info intel-microcode iproute2 iptables
iputils-ping iputils-tracepath irqbalance isc-dhcp-client isc-dhcp-
common iso-codes iw keyboard-configuration keyutils klibc-utils kmod
krb5-locales krb5-user language-pack-en language-pack-en-base
language-pack-gnome-en language-pack-gnome-en-base less
libaccountsservice0 libacl1 libapparmor1 libargon2-0 libasan4
libasn1-8-heimdal libassuan0 libatm1 libatomic1 libattr1 libaudit-
common libaudit1 libbinutils libblkid1 libbsd0 libbz2-1.0 libc-bin
libc-dev-bin libc6 libc6-dev libcap-ng0 libcap2 libcap2-bin libcc1-0
libcilkrts5 libcom-err2 libcryptsetup12 libcurl3-gnutls libcurl4
libdb5.3 libdbus-1-3 libdebconfclient0 libdevmapper-event1.02.1
libdevmapper1.02.1 libdpkg-perl libdrm-common libdrm2 libdumbnet1
libedit2 libelf1 libestr0 libevent-2.1-6 libexpat1 libexpat1-dev
libext2fs2 libfakeroot libfastjson4 libfdisk1 libffi6 libfreetype6
libfribidi0 libfuse2 libgc1c2 libgcc-7-dev libgcc1 libgcrypt20
libgdbm-compat4 libgeoip1 libgirepository-1.0-1 libglib2.0-0
libglib2.0-data libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpm2
libgssapi-krb5-2 libgssapi3-heimdal libgssrpc4 libhcrypto4-heimdal
libheimbase1-heimdal libheimntlm0-heimdal libhogweed4
libhx509-5-heimdal libitm1 libjs-jquery libjs-sphinxdoc libjs-
underscore libk5crypto3 libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-9
libkeyutils1 libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0
libksba8 libldap-2.4-2 libldap-common liblocale-gettext-perl liblsan0
liblz4-1 liblzma5 libmagic-mgc libmagic1 libmnl0 libmount1 libmpc3
libmpdec2 libmpfr6 libmpx2 libmspack0 libncurses5 libncursesw5
libnetfilter-conntrack3 libnettle6 libnewt0.52 libnfnetlink0
libnfsidmap2 libnghttp2-14 libnl-3-200 libnl-genl-3-200 libnorm1
libnpth0 libnss-systemd libnuma1 libp11-kit0 libpam-cap libpam-krb5
libpam-modules libpam-modules-bin libpam-runtime libpam-systemd
libpam0g libparted2 libpcap0.8 libpci3 libpcre3 libpgm-5.2-0
libpipeline1 libplymouth4 libpng16-16 libpolkit-gobject-1-0 libpopt0
libpsl5 libpython-all-dev libpython-dev libpython-stdlib libpython2.7
libpython2.7-dev libpython2.7-minimal
# tail -f /var/log/syslog
...
Jan 22 12:50:33 bionic-kernel systemd[1]: Assertion 'xsprintf: buf[] must be big enough' failed at ../src/core/job.c:803, function job_log_status_message(). Aborting.
Broadcast message from systemd-journald at bionic-kernel (Wed 2020-01-22
12:50:33 UTC):
systemd[1]: Caught <ABRT>, dumped core as pid 14620.
Broadcast message from systemd-journald at bionic-kernel (Wed 2020-01-22 12:50:33 UTC):
systemd[1]: Freezing execution.
Jan 22 12:50:33 bionic-kernel systemd[1]: Caught <ABRT>, dumped core as pid 14620.
Jan 22 12:50:33 bionic-kernel systemd[1]: Freezing execution.
[Regression Potential]
The patches replace xsprintf with snprintf and the regression
potential is small.
[Other]
Only Bionic is affected.
[1] https://github.com/systemd/systemd/issues/4534
[2] https://github.com/systemd/systemd/commit/e68eedbbdc98fa13449756b7fee3bed689d76493
[3] https://github.com/systemd/systemd/commit/574432f889ce3de126bbc6736bcbd22ee170ff82
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1860548/+subscriptions
More information about the foundations-bugs
mailing list