unable to import a wireguard config from non-short filenames

Bug #2064320 reported by Fabien Gagné
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-control-center
New
Unknown
gnome-control-center (Ubuntu)
Triaged
Low
Unassigned

Bug Description

In Ubuntu 24.04 LTS fresh install.
I am unable to import a Wireguard .conf configuration file from the gnome-control-center's Network panel.

Parameters -> Network -> VPN -> + -> Import from file
Select the .conf file that was sent by my VPN provider, then click Open

Results in the following error (French) : Impossible d'importer la connexion VPN. Le fichier AirVPN_Canada_UDP-1637-Entry3.conf" est illisible ou ne contient pas d'informations de connexion VPN reconnues. Erreur: le greffon ne prend pas en charge la fonction d'importation. Fermer

Which roughly translates to : Unable to import VPN connection. The AirVPN_Canada_UDP-1637-Entry3.conf" file is unreadable or does not contain recognized VPN connection information. Error: The plugin does not support the import function. Close

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: gnome-control-center 1:46.0.1-1ubuntu7
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 30 13:52:58 2024
InstallationDate: Installed on 2024-04-25 (5 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
ProcEnviron:
 LANG=fr_FR.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Fabien Gagné (fabiengagne) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. It seems a bit similar to https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2679 upstream, could you try if renaming the file with a shorter name makes a difference maybe?

Changed in gnome-control-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Fabien Gagné (fabiengagne) wrote :

Whoa you nailed it.

The code fails if the filename + extension is > 20 characters long. It handles the path name length correctly, it fails only if the filename + extension is longer than 20 characters. It should be good up to 255 or 32k characters, but it isn't.

Will this be fixed?

Revision history for this message
Fabien Gagné (fabiengagne) wrote :

omg I've tried to import a new wireguard config from my VPN provider, but with a short filename; the import seemed to fail because the dialog closed immediately after selecting the file and the new VPN connection would not add to the list. Tried a second time and had a crash; submitted the report as suggested but it would come back again as a new crash repeatedly. I decided to reboot to try again fresh but now I have no networking altogether. No Ethernet device in /dev
But lspci still reports my two Ethernet adapters.
I look like I will have to wipe off this system again, start from scratch.
:(

Revision history for this message
Sebastien Bacher (seb128) wrote :

Urg, sorry about those issues :-(

Thanks for confirming the file length issue

Changed in gnome-control-center (Ubuntu):
status: Incomplete → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've reported the error upstream
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3042

It's a bit unclear if the bug is in the setting of the backend though, if you get a working system again would you mean trying to do

$ nmcli connection import type wireguard file AirVPN_Canada_UDP-1637-Entry3.conf

and see if that works?

Changed in gnome-control-center (Ubuntu):
status: New → Triaged
summary: - gnome-control-center : unable to import a wireguard configuration from
- file
+ unable to import a wireguard config from non-short filenames
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Changed in gnome-control-center:
status: Unknown → New
Changed in gnome-control-center:
status: New → Unknown
Changed in gnome-control-center:
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.