Reproducer:
nmcli con add type wifi ifname wlan0 ssid asdasd wifi-sec.key-mgmt wpa-eap 
802-1x.eap leap 802-1x.identity username 802-1x.password aaaaaaaa


The crash (SIGABRT) happens in NetworkManager's Netplan integration patch, 
because of running into a "nm_assert_not_reached()" call. This could easily be 
avoided by muting that assert and just logging the error and returning FALSE 
(as is already done below the assert):

https://git.launchpad.net/ubuntu/+source/network-
manager/tree/debian/patches/netplan/0002-netplan-make-use-of-libnetplan-
for-YAML-backend.patch#n319

This would not fix the root-cause, though, which is located in
libnetplan: When creating or updating a NetworkManager connection
profile that uses a 802.1x eap authentication method unknown to Netplan
(such as "leap" or "pwd"), the Netplan keyfile parser is getting
confused and generates a broken keyfile config for NetworkManager.

https://github.com/canonical/netplan/blob/main/src/parse-nm.c#L383

This is triggered when manually adding/modifying a corresponding NM
connection profile (through the NM GUI, nmcli, NM DBus, ...) or
automatically, when migrating a corresponding profile through
NetworkManager's "Netplan everywhere" migration as part of the .postinst
maintainer script. In the latter case the crash is handled gracefully,
NetworkManager is restarted and the broken keyfile is restored from a
backup.

https://git.launchpad.net/ubuntu/+source/network-
manager/tree/debian/network-manager.postinst#n67


This can be fixed by supporting all of NetworkManager's 802.1x eap 
authentication methods in Netplan or by making Netplan's passthrough logic 
detect such cases and handle them as a fallback.


Kudos to @danilogondolfo for the investigation and the proposed patch:
https://github.com/canonical/netplan/pull/415

** Changed in: netplan.io (Ubuntu)
   Importance: Undecided => High

** Changed in: network-manager (Ubuntu)
   Importance: High => Medium

** Changed in: network-manager (Ubuntu)
       Status: New => Triaged

** Changed in: netplan.io (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/2038811

Title:
  
/usr/sbin/NetworkManager:6:g_assertion_message:g_assertion_message_expr:_internal_write_connection:nms_keyfile_writer_connection:nms_keyfile_plugin_update_connection

Status in netplan.io package in Ubuntu:
  Triaged
Status in network-manager package in Ubuntu:
  Triaged

Bug description:
  The Ubuntu Error Tracker has been receiving reports about a problem regarding 
network-manager.  This problem was most recently seen with package version 
1.44.2-1ubuntu1, the problem page at 
https://errors.ubuntu.com/problem/0185fff02c2976262de9f862e539829420f9c737 
contains more details, including versions of packages affected, stacktrace or 
traceback, and individual crash reports.
  If you do not have access to the Ubuntu Error Tracker and are a software 
developer, you can request it at http://forms.canonical.com/reports/.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2038811/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to