The crash is in src/core/settings/nm-settings.c, function
_add_connection_to_first_plugin(). When a bond connection is added via
the DBus API (as Cockpit does), the keyfile plugin stores the connection
successfully, but subsequent normalization in
_connection_changed_normalize_connection() returns NULL because the bond
lacks mandatory options that nmcli CLI normally supplies as defaults
(e.g., bond.mode). This NULL triggers nm_assert_not_reached() which
calls g_assertion_message_expr() and aborts the entire NetworkManager
daemon.
The same assertion exists in upstream main branch today (line 1700 in
the current main). I found 4 occurrences of nm_assert_not_reached() in
the add/update connection paths that can crash the daemon. The fix
replaces them with graceful _LOGT() messages and proper fallback
handling.
I've requested fork access on freedesktop.org GitLab to submit the merge
request upstream. In the meantime, the patch is attached.
Fix summary:
- src/core/settings/nm-settings.c: +12 lines, -4 lines
- Replaces nm_assert_not_reached() with error logging in:
1. UUID mismatch after plugin store (add path)
2. normalize failure after plugin store (add path - the reported crash)
3. NO_PERSIST mode unexpected (update path)
4. normalize failure after plugin store (update path)
Reproducer (via DBus API):
busctl call org.freedesktop.NetworkManager
/org/freedesktop/NetworkManager/Settings \
org.freedesktop.NetworkManager.Settings AddConnection a{sa{sv}} 1 \
"connection" a{sv} 3 "type" s "bond" "id" s "testbond" "interface-name" s
"mybond0"
Let me know if there's anything else needed from my side. Just to be
clear I am just some random person not an ubuntu developer (well not
yet!)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2150135
Title:
[networkmanager] nmcli con add type bond ifname mybond0 segfaults
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2150135/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs