On Mon, Jan 27, 2020 at 05:07:06PM -0000, Colin Ian King wrote:
> I guess the next question is why dmidecode being run as root is required
> on a cloud init?

cloud-init uses DMI data to identify that it is running on certain
platforms.  It will use /sys/class/dmi/... if available, but falls back
to dmidecode in its absence.

> What happens when arches don't have DMI data?

If running on a platform which identifies itself only via DMI data,
cloud-init will incorrectly determine that it is _not_ running on that
platform.

Given that other arches _can_ provide DMI data, and this cloud-init
behaviour is known, I would be surprised if any platform that _relies_
on it would launch a new architecture without DMI support.  So if we get
no data (instead of a reboot), then I believe the current behaviour is
correct.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to dmidecode in Ubuntu.
https://bugs.launchpad.net/bugs/1858615

Title:
  dmidecode triggers system reboot on Inforce 6640

Status in cloud-init:
  Invalid
Status in dmidecode package in Ubuntu:
  Fix Released
Status in dmidecode source package in Bionic:
  In Progress
Status in dmidecode source package in Eoan:
  In Progress
Status in dmidecode source package in Focal:
  Fix Released
Status in dmidecode package in Debian:
  Unknown

Bug description:
  [Impact]
  Running 'sudo dmidecode' on non-UEFI ARM systems can cause them to 
crash/reboot. cloud-init apparently runs dmidecode as root, so it breaks any 
cloud-init based installation.

  [Test Case]
  sudo dmidecode

  [Fix]
  Upstream has the following fix:

  commit e12ec26e19e02281d3e7258c3aabb88a5cf5ec1d
  Author: Jean Delvare <jdelv...@suse.de>
  Date: Mon Aug 26 14:20:15 2019 +0200

      dmidecode: Only scan /dev/mem for entry point on x86

  [Regression Risk]
  In Ubuntu, dmidecode only builds on amd64, arm64, armhf & i386.
  The fix is to disable code on !x86, so the regression risk is restricted to 
ARM platforms, where we know /dev/mem trolling is bad news.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1858615/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to