[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#648208: os-prober: blockdev --setro affects running kvm instances



Package: os-prober
Version: 1.42
Severity: important

I had the following issue with os-prober:

While running an apt-get upgrade, a kvm instance running on the same
machine reported journal write errors on it's virtual disk.

The virtual disk is a logical volume on the host filesystem.

Further investigation revealed that the apt-get upgrade triggered a
grub-update, which in turn called os-prober.

Os-prober then calls "blockdev --setro" on devices it considers not
mounted. Unfortunately, it doesn't see that the device is mounted
from kvm. Therefore, setting the device read-only affects the kvm
instance, which in turn reports a (non-recoverable) error.

Ubuntu seems to have the same problem:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/797547

IMHO, mounting random devices to check for their contents is a bad
idea. Even if one could rule out any influence on other processes using
the device at the same time: What about the other direction?

Consider a device some user has write access to. The user could
write random changes to that device while it is mounted. That could
easily trigger some untested corner cases in the filesystem code. What
if there are bugs leading to crashes or even allowing exploits?

It would be better if the user had a chance to select which devices
should be scanned. At least the user should be warned that running
os-prober while devices are used by other processes is not a safe
operation.

Regards,
Jan

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'oldstable'), (500, 'testing'), (99, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-smapi-x61s-amd64-00007-g03428a4 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages os-prober depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

os-prober recommends no packages.

os-prober suggests no packages.

-- no debconf information



Reply to: