nfs-utils: kernel version handling leads to segv on short versions (x.y)

Bug #796611 reported by Konstantin Khlebnikov
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
Oneiric
Invalid
Undecided
Unassigned
nfs-utils (Ubuntu)
Fix Released
High
Andy Whitcroft
Oneiric
Fix Released
High
Andy Whitcroft

Bug Description

for example version "3.0" break mount.nfs, because this code catch segfault on "3.0"

static inline unsigned int linux_version_code(void)
{
 struct utsname my_utsname;
 unsigned int p, q, r;

 if (uname(&my_utsname))
  return 0;

 p = atoi(strtok(my_utsname.release, "."));
 q = atoi(strtok(NULL, "."));
 r = atoi(strtok(NULL, "."));
 return MAKE_VERSION(p, q, r);
}

and this is very common hack, linux version always starts with three numbers.

Brad Figg (brad-figg)
tags: added: kernel-3.0
tags: added: oneiric
Revision history for this message
Andy Whitcroft (apw) wrote :

Upstream is switching version numbers to make them shorter. In order to shake out all these stupid pieces of hack in packages we have deliberatly uploaded a kernel with a short version and are working to fix the bugs.

Andy Whitcroft (apw)
summary: - kernel release must be 3.0.0 not 3.0, for compatibility
+ nfs-utils: kernel version handling leads to segv on short versions (x.y)
Changed in nfs-utils (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
Changed in nfs-utils (Ubuntu Oneiric):
assignee: nobody → Canonical Server Team (canonical-server)
Changed in linux (Ubuntu Oneiric):
status: New → Triaged
Andy Whitcroft (apw)
Changed in nfs-utils (Ubuntu):
status: Triaged → In Progress
importance: Critical → High
assignee: Canonical Server Team (canonical-server) → Andy Whitcroft (apw)
Revision history for this message
Andy Whitcroft (apw) wrote :

I have attempted to fix up the hack and produced some debug packages. Could those of you affected try these packages out with the 3.0-0.1 kernel and report back here. Packages are at the URL below:

    http://people.canonical.com/~apw/lp796611-oneiric/

Changed in nfs-utils (Ubuntu Oneiric):
status: In Progress → Incomplete
Revision history for this message
Gustaf (g-rantila) wrote :

Yes Andy it works great with those packages. I was unable to boot with kernel 3.0 since my fstab had nfs mounts, but now it both boots and mounts just fine.
Thanks.

Revision history for this message
cariboo (cariboo) wrote :

Updating to nfs-common_1.2.2-4ubuntu7~lp796611v1_amd64.deb, solved the segfault problem for me.

Andy Whitcroft (apw)
Changed in nfs-utils (Ubuntu Oneiric):
status: Incomplete → In Progress
Revision history for this message
Merelin (merelin) wrote :

I confirm that fix works fine.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.2.2-4ubuntu7

---------------
nfs-utils (1:1.2.2-4ubuntu7) oneiric; urgency=low

  [ Andy Whitcroft ]
  * ubuntu-fix-kernel-version-handling: avoid segfaults from short kernel
    version numbers. (LP: #796611)
 -- Evan Dandrea <email address hidden> Tue, 14 Jun 2011 17:13:14 +0100

Changed in nfs-utils (Ubuntu Oneiric):
status: In Progress → Fix Released
Revision history for this message
Andy Whitcroft (apw) wrote :

We will make a decicision nearer release as to whether we will release using 3.0 or 3.0.0, that is tracked as a release item therefore closing out this specific issue against the kernel.

Changed in linux (Ubuntu Oneiric):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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