segfault on bad usage of generator

Bug #1714267 reported by Scott Moser on 2017-08-31
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Low
Mathieu Trudel-Lapierre
Xenial
Undecided
Unassigned

Bug Description

[Impact]
netplan's systemd-generator segfaults if called with no arguements.
it should better show usage or something else and exit non-zero.

[Test case]
# /lib/systemd/system-generators/netplan

The above command should not crash, but respond with a suitable error message. Without the update, it behaves like this:

"""
(netplan:842): GLib-CRITICAL **: g_strv_length: assertion 'str_array != NULL' failed
**
ERROR:src/generate.c:86:main: assertion failed: (g_strv_length(files) == 3)
Aborted (core dumped)
"""

[Regression Potential]
This is a command not meant to be used directly; but spurious crashes or misbehavior of netplan at boot time, such as failing to generate networkd/NM config for a netplan yaml configuration that is valid, would consistute a potential regression of this update.

---

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: nplan 0.26
ProcVersionSignature: Ubuntu 4.12.0-11.12-generic 4.12.5
Uname: Linux 4.12.0-11-generic x86_64
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
Date: Thu Aug 31 14:24:24 2017
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: nplan
UpgradeStatus: No upgrade log present (probably fresh install)

Scott Moser (smoser) wrote :
Changed in nplan (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in nplan (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in nplan (Ubuntu):
status: Triaged → Fix Committed
Changed in nplan (Ubuntu):
status: Fix Committed → Fix Released
description: updated

Hello Scott, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nplan/0.29~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nplan (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers