Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 850157 - net-misc/networkmanager-1.36.4: fails at runtime with FORTIFY_SOURCE=3
Summary: net-misc/networkmanager-1.36.4: fails at runtime with FORTIFY_SOURCE=3
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 847148
  Show dependency tree
 
Reported: 2022-06-06 23:27 UTC by Randall
Modified: 2022-06-07 02:13 UTC (History)
2 users (show)

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


Attachments
stract nmcli radio all on (file_850157.txt,46.27 KB, text/plain)
2022-06-07 00:06 UTC, Randall
Details
systemctl status NetworkManager.service (file_850157.txt,1.96 KB, text/plain)
2022-06-07 00:07 UTC, Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randall 2022-06-06 23:27:30 UTC
NetworkManager failed to load correctly with FORTIFY_SOURCE=3. Reverting to FORTIFY_SOURCE=2 fixed the issue.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-06 23:30:01 UTC
Can you give us a backtrace and/or error output?

FWIW, tamiko seems to have hit this too, and apparently is fixed in 1.38.
Comment 2 Randall 2022-06-06 23:50:09 UTC
Yeah, let me break it again. 😜
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-06 23:52:23 UTC
(In reply to Randall from comment #2)
> Yeah, let me break it again. 😜

fwiw it's not a *huge* deal if you don't want to bust your internet again, b/c we know 1.38 is somehow okay, but I'm curious :)
Comment 4 Randall 2022-06-06 23:53:41 UTC
> fwiw it's not a *huge* deal if you don't want to bust your internet again, b/c we know 1.38 is somehow okay, but I'm curious :)

We'll do it in the name of science. LOL.
Comment 5 Randall 2022-06-07 00:06:54 UTC
Created attachment 783188 [details]
stract nmcli radio all on
Comment 6 Randall 2022-06-07 00:07:10 UTC
That was supposed to be strace. Lol.
Comment 7 Randall 2022-06-07 00:07:36 UTC
Created attachment 783191 [details]
systemctl status NetworkManager.service
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-07 00:08:59 UTC
We'll want coredumpctl output from when it crashes too. You'll need debugging symbols on networkmanager, glibc, and probably glib to make it useful.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-07 02:13:50 UTC
From the backtrace shared with me, I think this was either fixed in:
- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/7b3466fc4cfedd85992fa24953a08f9f07d6d28f (or similar)
or
- parse_env_file (and related functions)
=> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/c44b49db6f3deb6a42bbd617b4b672076959638c
=> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1188
=> https://bugzilla.redhat.com/show_bug.cgi?id=2073067

So it's seemingly fixed in 1.38.0.

bt:
```
#0  __pthread_kill_implementation
    (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f56b9acedef in __pthread_kill_internal (signo=6, threadid=<optimized out>)
    at pthread_kill.c:78
#2  0x00007f56b9a7f232 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f56b9a69462 in __GI_abort () at abort.c:79
#4  0x00007f56b9ac2f68 in __libc_message
    (action=action@entry=do_abort, fmt=fmt@entry=0x7f56b9bff4b0 "*** %s ***: terminated
")
    at ../sysdeps/posix/libc_fatal.c:155
#5  0x00007f56b9b61422 in __GI___fortify_fail
    (msg=msg@entry=0x7f56b9bff456 "buffer overflow detected") at fortify_fail.c:26
#6  0x00007f56b9b5fe00 in __GI___chk_fail () at chk_fail.c:28
#7  0x00007f56b9b60485 in __fread_chk
    (ptr=ptr@entry=0x7f569c01c4b0, ptrlen=ptrlen@entry=60, size=size@entry=1, n=n@entry=71, stream=stream@entry=0x55eaa8b74bc0) at fread_chk.c:39
#8  0x000055eaa8064bcc in fread (__stream=0x55eaa8b74bc0, __n=71, __size=1, __ptr=0x7f569c01c4b0)
    at /usr/include/bits/stdio2.h:296
#9  read_full_stream_full
    (offset=18446744073709551615, size=18446744073709551615, flags=0, ret_size=0x0, ret_contents=0x7ffcd93e28f8, filename=0x81a4 <error: Cannot access memory at address 0x81a4>, f=0x55eaa8b74bc0)
    at ../NetworkManager-1.36.4/src/libnm-systemd-shared/src/basic/fileio.c:676
#10 read_full_file_full
    (filename=filename@entry=0x55eaa8b990b0 "/var/lib/NetworkManager/internal-30932fad-4d1b-4c71-8874-ceabce0d1e61-eno1.lease", ret_contents=ret_contents@entry=0x7ffcd93e28f8, ret_size=0x0, bind_name=0x0, flags=0, size=18446744073709551615, offset=18446744073709551615, dir_fd=-100)
    at ../NetworkManager-1.36.4/src/libnm-systemd-shared/src/basic/fileio.c:835
#11 0x000055eaa80826d6 in read_full_file
    (ret_size=0x0, ret_contents=0x7ffcd93e28f8, filename=0x55eaa8b990b0 "/var/lib/NetworkManager/internal-30932fad-4d1b-4c71-8874-ceabce0d1e61-eno1.lease")
    at ../NetworkManager-1.36.4/src/libnm-systemd-shared/src/basic/fileio.h:68
#12 parse_env_file_internal (f=0x0, push=0x55eaa8076880 <parse_env_file_push>, n_pushed=0x7ffcd93e28f4, userdata=0x7ffcd93e2910, fname=0x55eaa8b990b0 "/var/lib/NetworkManager/internal-30932fad-4d1b-4c71-8874-ceabce0d1e61-eno1.lease") at ../NetworkManager-1.36.4/src/libnm-systemd-shared/src/basic/env-file.c:47
#13 parse_env_filev (fname=0x55eaa8b990b0 "/var/lib/NetworkManager/internal-30932fad-4d1b-4c71-8874-ceabce0d1e61-eno1.lease", ap=ap@entry=0x7ffcd93e2970, f=0x0) at ../NetworkManager-1.36.4/src/libnm-systemd-shared/src/basic/env-file.c:350
#14 0x000055eaa80830d1 in parse_env_file_sentinel (f=f@entry=0x0, fname=fname@entry=0x55eaa8b990b0 "/var/lib/NetworkManager/internal-30932fad-4d1b-4c71-8874-ceabce0d1e61-eno1.lease", f=0x0) at ../NetworkManager-1.36.4/src/libnm-systemd-shared/src/basic/env-file.c:367
#15 0x000055eaa808f22a in dhcp_lease_load (ret=ret@entry=0x7ffcd93e31b0, lease_file=0x55eaa8b990b0 "/var/lib/NetworkManager/internal-30932fad-4d1b-4c71-8874-ceabce0d1e61-eno1.lease") at ../NetworkManager-1.36.4/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-lease.c:1155
#16 0x000055eaa8175d7d in ip4_start (client=0x55eaa8ba51f0, error=<optimized out>) at ../NetworkManager-1.36.4/src/core/dhcp/nm-dhcp-nettools.c:1100
#17 0x000055eaa8042f63 in nm_dhcp_client_start_ip4 (error=0x7ffcd93e36a8, self=0x55eaa8ba51f0) at ../NetworkManager-1.36.4/src/core/dhcp/nm-dhcp-client.c:458
#18 nm_dhcp_manager_start_client (self=<optimized out>, config=config@entry=0x7ffcd93e36e0, error=error@entry=0x7ffcd93e36a8) at ../NetworkManager-1.36.4/src/core/dhcp/nm-dhcp-manager.c:206
#19 0x000055eaa81b35d1 in _dev_ipdhcpx_start (self=self@entry=0x55eaa8b97c10, addr_family=addr_family@entry=2) at ../NetworkManager-1.36.4/src/core/devices/nm-device.c:10180
#20 0x000055eaa81b6c19 in activate_stage3_ip_config_for_addr_family (self=0x55eaa8b97c10, addr_family=2, method=0x55eaa821b157 "auto") at ../NetworkManager-1.36.4/src/core/devices/nm-device.c:11630
#21 0x000055eaa81eb480 in activate_stage3_ip_config (self=0x55eaa8b97c10) at ../NetworkManager-1.36.4/src/core/devices/nm-device.c:11906
#22 0x000055eaa7f76b47 in _cb_info_complete (call_id=0x7f569c0078a0, error=<optimized out>) at ../NetworkManager-1.36.4/src/core/nm-firewalld-manager.c:217
#23 0x000055eaa81023ba in _handle_idle_cb (user_data=0x7f569c0078a0) at ../NetworkManager-1.36.4/src/core/nm-firewalld-manager.c:248
#24 0x00007f56ba018e6d in g_main_dispatch (context=0x55eaa8af2a00) at ../glib-2.72.1/glib/gmain.c:3417
#25 g_main_context_dispatch (context=0x55eaa8af2a00) at ../glib-2.72.1/glib/gmain.c:4135
#26 0x00007f56ba077898 in g_main_context_iterate.constprop.0 (context=0x55eaa8af2a00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.72.1/glib/gmain.c:4211
#27 0x00007f56ba017e3e in g_main_loop_run (loop=0x55eaa8af2af0) at ../glib-2.72.1/glib/gmain.c:4411
#28 0x000055eaa7f51739 in main (argc=<optimized out>, argv=<optimized out>) at ../NetworkManager-1.36.4/src/core/main.c:509
```