netcfg segfauts when preseeding 12.04 LTS networkless

Bug #901700 reported by Ralf Spenneberg on 2011-12-08
52
This bug affects 9 people
Affects Status Importance Assigned to Milestone
netcfg (Debian)
Fix Released
Unknown
netcfg (Ubuntu)
High
Unassigned
Precise
High
Chris J Arges
ubiquity (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned

Bug Description

SRU Justification:
[Impact]
netcfg will segfault if users use this feature in the preseed file.

[Test Case]
1) Add the following lines to your preseed file of your Ubuntu installation target:

# Disable network configuration entirely. This is useful for cdrom
# installations on non-networked devices where the network questions,
# warning and long timeouts are a nuisance.
d-i netcfg/enable boolean false
d-i netcfg/get_hostname string BLABLABLA
d-i netcfg/get_hostname seen true

2) Start the installation that refers to this seed file.

3) Wait until netcfg will load.

=> When loading the netcfg module, the installer will report an error (red message box). In the log console you will find a segfault message in the netcfg execution as mentioned above.

[Regression Potential]

This change removes an extra hostname variable definition that is defined in netcfg.c. This extra definition actually assigns NULL to the pointer, causing a segfault when that memory location is accessed. The hostname is defined externally to that file and is the correct variable to reference.

Original Description
--------------------

I have built a USB-Stick to install Ubuntu Server Precise Alpha 1 64 Bit based on the precise-alpha-1-amd64 ISO image.

Installation works but the netcfg component segfaults!

The installer screen shows an error. The 4th console shows:

INFO: Menu item 'netcfg' selected
INFO: Starting netcfg v.1.68ubuntu7 (built 2011-08-0004)
WARNING **: Configuring 'netcfg' failed with error code 139
WARNING **: Menu item 'netcfg' failed.
netcfg[14152]: segfault at 0 ip 00007f8cc8e82572 sp 00007fffd1413bb8 error 6 in libc-2.13.so[7f8cc8d58000+195000]

The installation continues when choosing the next item on the menu.

These are the options used for preseeding netcfg:
d-i netcfg/enable boolean false
d-i netcfg/dhcp_options select Do not configure the network at this time
d-i netcfg/dhcp_failed note
d-i netcfg/network-manager boolean false
# netcfg will choose an interface that has link if possible. This makes it
#d-i netcfg/choose_interface select auto
#d-i netcfg/disable_dhcp boolean true
#d-i netcfg/get_nameservers string 192.168.1.1
#d-i netcfg/get_ipaddress string 192.168.1.42
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string 192.168.1.1
#d-i netcfg/confirm_static boolean true
d-i netcfg/get_hostname string lb-new
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/wireless_wep string

Any ideas?

Ralf Spenneberg (ralq) wrote :

Removing all netcfg preseeding options circumvents the segfault.

Ralf Spenneberg (ralq) wrote :

Turning on this option, make netcfg segfault:
d-i netcfg/enable boolean false

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/901700/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment

I'm experiencing this bug too (d-i netcfg/enable boolean false i preeseed) with both Oneiric released and Precise Alpha 1 using Ubuntu harddisk installer images and alternate ISOs from either:

http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/20101020ubuntu72/images/hd-media/
http://cdimage.ubuntu.com/releases/precise/alpha-1/

http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/20101020ubuntu86/images/hd-media/
http://releases.ubuntu.com/oneiric/

Error log from Consol4:
Dec 8 19:03:33 main-menu[384]: INFO: Menu item 'netcfg' selected
Dec 8 19:03:33 netcfg[7067]: INFO: Starting netcfg v.1.68ubuntu7 (built 20111008-0004)
Dec 8 19:03:33 main-menu[384]: WARNING **: Configuring 'netcfg' failed with error code 139
Dec 8 19:03:33 main-menu[384]: WARNING **: Menu item 'netcfg' failed.
Dec 8 19:03:33 kernel: [ 39.609929] netcfg[7067]: segfault at 0 ip 00007fdcdbad25d3 sp 00007fff7af18038 error 6 in libc-2.13.so[7fdcdb9a8000+195000]

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
affects: ubuntu → netcfg (Ubuntu)
Anthony Awtrey (tony-awtrey) wrote :

This issue has been reported upstream:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690330

It is currently fixed in git and will be part of the 1.99 release.

Stefan (steffel) wrote :

I have applied and successfully tested Philipp Kern's patch for the segfault issue (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690330).
Attached you'll find a debdiff for testing for precise as patch "ubuntu15" (current precise patchlevel "ubuntu14").

The attachment "Debian netcfg segfault patch #690330" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Brian Murray (brian-murray) wrote :

I'll go ahead and upload this fix to Raring which is the development release of Ubuntu. However, for this to be fixed in stable releases of Ubuntu we'll need to follow the Stable Release Updates process. http://wiki.ubuntu.com/StableReleaseUpdates. Part of that process requires a test case, detailed steps to recreate the bug, which I do not see in either this bug or the Debian one. If you could update the bug with that information I'll be happy to upload this to Precise also. Thanks in advance.

Changed in netcfg (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
Changed in netcfg (Ubuntu):
importance: Undecided → High
Changed in netcfg (Debian):
status: Unknown → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netcfg - 1.68ubuntu17

---------------
netcfg (1.68ubuntu17) raring; urgency=low

  [ Philipp Kern ]
  * netcfg.c (main): Remove a local definition of hostname.
    (Closes: #690330, LP: #901700)
 -- Brian Murray <email address hidden> Wed, 12 Dec 2012 13:37:02 -0800

Changed in netcfg (Ubuntu):
status: Confirmed → Fix Released
Stefan (steffel) wrote :

Hi Brian!

In my environment, I added the following lines to the preseed file (see below).
I hope this information is enough, otherwise just tell me if you need more.

Bye,
Stefan

Test case and Bug reproduction
--------------------------------------------------------------------

1) Add the following lines to your preseed file of your Ubuntu installation target:

# Disable network configuration entirely. This is useful for cdrom
# installations on non-networked devices where the network questions,
# warning and long timeouts are a nuisance.
d-i netcfg/enable boolean false
d-i netcfg/get_hostname string BLABLABLA
d-i netcfg/get_hostname seen true

2) Start the installation that refers to this seed file.

3) Wait until netcfg will load.

=> When loading the netcfg module, the installer will report an error (red message box). In the log console you will find a segfault message in the netcfg execution as mentioned above.

description: updated
Jonathan Davies (jpds) on 2013-11-19
summary: - netcfg segfauts when preseeding Precise Alpha 1
+ netcfg segfauts when preseeding 12.04 LTS
Chris J Arges (arges) on 2013-11-19
Changed in netcfg (Ubuntu Precise):
assignee: nobody → Chris J Arges (arges)
Jonathan Davies (jpds) on 2013-11-19
summary: - netcfg segfauts when preseeding 12.04 LTS
+ netcfg segfauts when preseeding 12.04 LTS networkless
Chris J Arges (arges) on 2013-11-19
Changed in netcfg (Ubuntu Precise):
status: Triaged → In Progress
Chris J Arges (arges) wrote :

Fix uploaded for Precise.

description: updated

Hello Ralf, or anyone else affected,

Accepted netcfg into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/netcfg/1.68ubuntu14.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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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 netcfg (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Jonathan Davies (jpds) wrote :

Verified on VM on an isolated network with netcfg/enable=false.

tags: added: verification-done
removed: verification-needed
Dimitri John Ledkov (xnox) wrote :

Ubiquity includes netcfg.

Changed in ubiquity (Ubuntu):
status: New → Fix Released
Changed in ubiquity (Ubuntu Precise):
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netcfg - 1.68ubuntu14.1

---------------
netcfg (1.68ubuntu14.1) precise; urgency=low

  [ Philipp Kern ]
  * netcfg.c (main): Remove a local definition of hostname.
    (Closes: #690330, LP: #901700)
 -- Chris J Arges <email address hidden> Tue, 19 Nov 2013 09:45:02 -0600

Changed in netcfg (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Hello Ralf, or anyone else affected,

Accepted ubiquity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubiquity/2.10.28 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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 ubiquity (Ubuntu Precise):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Dimitri John Ledkov (xnox) wrote :

ubiquity preseeds its own hostname usually, so this is just a package refresh for ubiquity. Marking as verification-done (no regression in automatic / manual tests / unit tests)

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.10.28

---------------
ubiquity (2.10.28) precise; urgency=low

  * Automatic update of included source packages: partman-
    basicfilesystems 71ubuntu3.4. (LP: #978032)

ubiquity (2.10.27) precise; urgency=low

  * Automatic update of included source packages: netcfg 1.68ubuntu14.1
    (LP: #901700), partman-auto 101ubuntu2.2 (LP: #1197766, #1065281),
    partman-base 153ubuntu6 (LP: #1065281), partman-basicfilesystems
    71ubuntu3.3 (LP: #978032, #1215458), partman-btrfs 8ubuntu1.1 (LP:
    #978032), partman-efi 25ubuntu1.2 (LP: #1065281), partman-ext3
    67ubuntu1.1 (LP: #978032).
 -- Dmitrijs Ledkovs <email address hidden> Tue, 03 Dec 2013 18:04:05 +0000

Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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