growpart tickles overflow bug with big disks

Bug #956870 reported by Neil Wilson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
Fix Released
Undecided
Unassigned
cloud-initramfs-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

If the number of blocks in a disk is greater than the maximum size of a signed 32-bit integer then growpart will fail in the initramfs.

This is because the 'test' function in busybox gives the incorrect answer with large numbers. Since the busybox test function works fine under 'libc' when a server is booted, it looks like the root cause is a 32-bit overflow fault in klibc.

To check for the problem, boot a server with a 'break init' option to force the initramfs to drop to a shell.

(initramfs) [ 2117696 -gt 2147483647 ]
(initramfs) echo $?
1
(initramfs) [ 2117696 -gt 2147483648 ]
(initramfs) echo $?
0

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cloud-initramfs-growroot (not installed)
ProcVersionSignature: Ubuntu 3.0.0-16.29-generic 3.0.20
Uname: Linux 3.0.0-16-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
CheckboxSubmission: 55cafa5b8b82ed224cc59d444cb1fc25
CheckboxSystem: 3e53d3ea5811723345f19eff5070f9ab
Date: Fri Mar 16 11:05:07 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: cloud-initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Neil Wilson (neil-aldur) wrote :
Neil Wilson (neil-aldur)
tags: added: precise
Neil Wilson (neil-aldur)
no longer affects: klibc (Ubuntu)
Revision history for this message
Neil Wilson (neil-aldur) wrote :

The initramfs uses a different version of busybox to standard (in package busybox-initramfs) - located in /usr/lib/initramfs-tools/bin/busybox

Running this version of busybox does exhibit the error on a normal server.

Checking the config in the package it appears that CONFIG_FEATURE_TEST_64 is not set for the initramfs version.

summary: - growpart tickles overflow bug in klibc with big disks
+ growpart tickles overflow bug with big disks
Revision history for this message
Neil Wilson (neil-aldur) wrote :

The description of the busybox-initramfs package is wrong - as the binary is no longer statically linked.

Neil Wilson (neil-aldur)
Changed in cloud-initramfs-tools (Ubuntu):
status: New → Invalid
Colin Watson (cjwatson)
Changed in busybox (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.18.5-1ubuntu3

---------------
busybox (1:1.18.5-1ubuntu3) precise; urgency=low

  * [initramfs] Switch on 64 bit extensions (LP: #956870)
  * [initramfs] Update package description - remove statically linked reference
 -- Neil Wilson <email address hidden> Mon, 26 Mar 2012 14:06:13 +0100

Changed in busybox (Ubuntu):
status: Fix Committed → Fix Released
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.