Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925888 - sys-apps/portage: fails to parse /proc/self/mountinfo with mountpoint containing a carriage return
Summary: sys-apps/portage: fails to parse /proc/self/mountinfo with mountpoint contain...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 925481
Blocks:
  Show dependency tree
 
Reported: 2024-03-01 06:51 UTC by Haelwenn (lanodan) Monnier
Modified: 2024-04-28 00:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haelwenn (lanodan) Monnier 2024-03-01 06:51:17 UTC
Arguably this is rather evil on my part.

Exact setup:

# mkdir $'/mnt/ \t\\\\\r\n'
# mount … $'/mnt/ \t\\\\\r\n'
# tail -n 1 /proc/self/mountinfo | sed 's;\r;^M;'
123 29 0:58 / /mnt/\040\011\134\134^M\012 rw,relatime - zfs cloudchaser/ROOT/alpine rw,xattr,noacl
# tail -n 1 /proc/self/mountinfo | sed -l 0 -n l
123 29 0:58 / /mnt/\\040\\011\\134\\134\r\\012 rw,relatime - zfs cloudchaser/ROOT/alpine rw,xattr,noacl$

Got during merge time:

!!! /proc/self/mountinfo contains unrecognized line: 123 29 0:58 / /mnt/\040\011\134\134
!!! /proc/self/mountinfo contains unrecognized line: \012 rw,relatime - zfs cloudchaser/ROOT/alpine rw,xattr,noacl

# emerge --info
Portage 3.0.61 (python 3.11.8-final-0, platforms/pc, gcc-11, musl-1.2.4-r1, 6.1.57-gentoo x86_64)
=================================================================
System uname: Linux-6.1.57-gentoo-x86_64-AMD_Ryzen_5_PRO_3500U_w-_Radeon_Vega_Mobile_Gfx-with-libc
KiB Mem:    14939736 total,    887068 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo-bootstrap: Sun, 18 Feb 2024 17:33:26 +0000
Head commit of repository gentoo-bootstrap: 1dc40d7326b457bc133c9929ba10ad5bcd349b38

Head commit of repository guru: 9b3fb58b026524f9b5423cc5b9da51ab2b5f5f26

Timestamp of repository musl: Mon, 12 Feb 2024 16:35:42 +0000
Head commit of repository musl: 9c33f5824f52280d7ffac36854063a57ce403de9

Timestamp of repository pentoo: Fri, 23 Feb 2024 19:18:22 +0000
Head commit of repository pentoo: cfb53fb979cf23e576cef579df490f65371c0b3c

Head commit of repository gentoo: dfde163e9ef4705c4f58f7d93b63848b635f8be8

Head commit of repository lanodanOverlay: 4a025d642c9d30dc6d6ebd349c74366bd6c31601

sh lksh
ld GNU ld (Gentoo 2.40 p7) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.71-r6::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.3::gentoo
dev-build/libtool:         2.4.7-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.1-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.13_p3::gentoo, 3.11.8_p1::gentoo, 3.12.2_p1::gentoo
sys-apps/baselayout:       2.14-r2::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.40-r9::gentoo, 2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc:             11.3.1_p20230427::gentoo, 12.3.1_p20230825::gentoo, 13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             16.0.6::gentoo, 17.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4-r1::gentoo
Repositories:

gentoo-bootstrap
    location: /repo/gentoo-bootstrap
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-bootstrap.git
    masters: gentoo
    priority: 0
    volatile: True

guru
    location: /repo/guru
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 0
    volatile: True

musl
    location: /repo/musl
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/musl.git
    masters: gentoo
    priority: 0
    volatile: True

pentoo
    location: /repo/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    priority: 0
    volatile: True

crossdev
    location: /repo/portage-crossdev
    masters: gentoo
    priority: 10
    volatile: True

gentoo
    location: /repo/gentoo
    sync-type: git
    sync-uri: https://github.com/lanodan/gentoo.git
    priority: 100
    volatile: True

lanodanOverlay
    location: /repo/lanodanOverlay
    sync-type: git
    sync-uri: https://hacktivis.me/git/overlay.git
    masters: gentoo guru gentoo-bootstrap
    priority: 200
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang-as"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC -Qunused-arguments"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /lib/udev/rules.d/ /usr/share/config /var/games/atris/ /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC -Qunused-arguments"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --usepkg --binpkg-changed-deps=y --misspell-suggestions=n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync mount-sandbox network-sandbox news noinfo parallel-fetch parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned python-trace qa-unresolved-soname-deps sfperms splitdebug strict strict-keepdir suidctl unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ https://mirrors.dotsrc.org/gentoo/ https://gentoo.osuosl.org/ http://distfiles.gentoo.org"
INSTALL_MASK=" /usr/lib/systemd /usr/lib64/systemd /lib/systemd /etc/systemd /etc/sudoers /etc/sudoers.d /usr/share/bash-completion /usr/share/zsh /usr/share/fish /etc/xdg/autostart /usr/share/git-core/templates/hooks /usr/share/man/man1/builtins.1 /etc/skel /var/empty /etc/cron.daily/mandoc /usr/lib/systemd /usr/lib64/systemd /lib/systemd /etc/systemd /etc/sudoers /etc/sudoers.d /usr/share/bash-completion /usr/share/zsh /usr/share/fish /etc/xdg/autostart /usr/share/git-core/templates/hooks /usr/share/man/man1/builtins.1 /etc/skel /var/empty /etc/cron.daily/mandoc charset.alias /usr/share/locale/locale.alias /sbin/reboot /sbin/poweroff /sbin/shutdown /usr/share/applications/"
LANG="C.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--as-needed -fuse-ld=lld"
LEX="flex"
MAKEOPTS="-j8"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="true"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
SHELL="/bin/mksh"
STRINGS="strings"
STRIP="llvm-strip"
USE="(cuda) (pgo) acl acpi alsa amd64 avif bzip2 cacert caps ccache cet cjk clang cli crypt cryptsetup d3d9 dane device-mapper dri egl eglfs eme-free eselect-ldso fortran gentoo-dev glamor gles gles1 gles2 gtk3 hardened harfbuzz iconv icu idn iproute2 ipv6 jingle jpeg jumbo-build libcxx libproxy libtirpc libtommath libzfs llvm-libunwind lm-sensors luajit mandoc metric mikmod modplug modules-sign multitarget ncurses nls opencl opengl openmp opus pcre pic pie pipewire png qt3support readline sanitize sasl seatd seccomp smp spell ssl ssp symlink syslog system-* system-act system-av1 system-boost system-bootloader system-bootstrap system-cairo system-crontab system-ffmpeg system-glew system-glfw system-harfbuzz system-heimdal system-icu system-info system-ipxe system-jpeg system-kopia system-lcms system-leveldb system-libcxx system-libevent system-libfmt system-librnp system-libsecp256k1 system-libvpx system-libyaml system-llvm system-lua system-lz4 system-man system-mathjax system-mimalloc system-miniaudio system-mitkrb5 system-mongodb system-mspack system-openjfx system-png system-protoc system-python-libs system-qemu system-quazip system-rocksdb system-seabios system-service system-sqlite system-ssl system-stb system-toolchain system-vulkan system-webp system-wfconfig system-wide system-wlroots system-zlib system-zstd theora threads tre truetype udev unicode urandom usb uvm vaapi vhosts vorbis vulkan wayland wayland-only webp xattr xcsecurity xtpax zfs zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en en-US en-GB fr fr-CA ja is jbo de de-DE ru br" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF PowerPC Sparc WebAssembly X86 Xtensa" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-4" NGINX_MODULES_HTTP="access autoindex brotli charset fastcgi gzip gzip_static limit_conn limit_req map memcached metrics mirror proxy scgi split_clients ssi upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi vhost_traffic_status headers_more stub_status" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby31" SANE_BACKENDS="snapcan" VIDEO_CARDS="radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RUSTFLAGS, SIZE, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-01 06:56:13 UTC
Pffff.
Comment 2 Larry the Git Cow gentoo-dev 2024-03-01 16:20:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=d8089d1af39c80e1edfb1669ae92fef7ab30e08a

commit d8089d1af39c80e1edfb1669ae92fef7ab30e08a
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-03-01 15:49:26 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-03-01 16:19:55 +0000

    Improve whitespace handling when parsing /proc/self/mountinfo
    
    Only break lines on "\n" (line feed).
    Only split lines on " " (space).
    
    Bug: https://bugs.gentoo.org/925888
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 lib/portage/util/writeable_check.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2024-04-28 00:32:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e53b9368c215451e3af78b557d8b86a2db9677

commit f1e53b9368c215451e3af78b557d8b86a2db9677
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-28 00:31:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-28 00:31:29 +0000

    sys-apps/portage: add 3.0.64
    
    Closes: https://bugs.gentoo.org/925481
    Closes: https://bugs.gentoo.org/675748
    Closes: https://bugs.gentoo.org/712222
    Closes: https://bugs.gentoo.org/920330
    Closes: https://bugs.gentoo.org/925213
    Closes: https://bugs.gentoo.org/925863
    Closes: https://bugs.gentoo.org/925888
    Closes: https://bugs.gentoo.org/925907
    Closes: https://bugs.gentoo.org/926048
    Closes: https://bugs.gentoo.org/926221
    Closes: https://bugs.gentoo.org/927059
    Closes: https://bugs.gentoo.org/927632
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.64.ebuild | 242 +++++++++++++++++++++++++++++++++
 2 files changed, 243 insertions(+)