[MIR] ipmitool

Bug #1978144 reported by Lena Voytek
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipmitool (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

An MIR was originally attempted a few years ago (see LP: #1576812) but was denied as the package was not yet in a good enough state. In that time ipmitool has become a more reasonable candidate for main inclusion.

ipmitool is used often by MAAS and has shown up in component mismatches for a few years. It is also used often for high availability systems.

[Availability]
The package ipmitool is already in Ubuntu universe.
The package ipmitool builds for the architectures it is designed to work on.
It currently builds and works for architectures: any
Link to package https://launchpad.net/ubuntu/+source/ipmitool

[Rationale]
- The package ipmitool will generally be useful for a large part of our
  user base since it is widely used in systems management and in various
  HA components. It is also suggested by tools such as cluster-glue which
  is in main

[Security]
- Based on CVE trackers ipmitool had 2 relevant security issues
- CVE-2020-5208 (https://ubuntu.com/security/CVE-2020-5208): handled in
  1.8.19 upstream and in a set of 6 patches in 1.8.18-10.1 Debian/Ubuntu
- CVE-2011-4339 (https://ubuntu.com/security/CVE-2011-4339): Fixed
  in 1.8.11-5

- The binary ipmievd is installed to /usr/sbin. It has a fairly limited
  scope with limited exposure, acting as a daemon for sending IPMI events
  to syslog. ipmievd requires super user priveleges to access syslog.
- The package installs a service corresponding to ipmievd located at:
  /etc/init.d/ipmievd and /lib/systemd/system/ipmievd.service
- The package does not open privileged ports (ports < 1024), but defaults to
  using port 514 in certain situations.
- The package does not contain extensions to security-sensitive software

[Quality assurance - function/usage]
- The package works well right after install. Site-specific options for
  accessing a BMC may be necessary, but are documented in the man page.

[Quality assurance - maintenance]
- Ubuntu https://bugs.launchpad.net/ubuntu/+source/ipmitool/+bug
- Debian https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ipmitool
- The package is maintained well in Debian/Ubuntu and does not have too
  many bugs with nothing long term and critical open
- The package does not deal with exotic hardware we cannot support

[Quality assurance - testing]
- The package does not run a test at build time because it has no test
  suite. If it had tests they would likely have strict hardware
  dependencies.
- The package does not have any autopkgtests

[Quality assurance - packaging]
- debian/watch is present and works

- This package does not yield massive lintian Warnings, Errors
Lintain results:
W: ipmitool-dbgsym: elf-error In program headers: Unable to find program interpreter name [usr/lib/debug/.build-id/83/f454e3ecf71ef36fda026461a8785a747ec163.debug]
W: ipmitool-dbgsym: elf-error In program headers: Unable to find program interpreter name [usr/lib/debug/.build-id/d9/d138606f42a79ef56f95617d3f57b765b3afe4.debug]

- Lintian overrides are no longer present in the package

- This package does not rely on obsolete or about to be demoted packages.
- This package has no python2 or GTK2 dependencies
- The package will not be installed by default
- Packaging and build is easy

[UI standards]
- Outside of the comand-line tool, the application is not end-user facing.
  It has no translations present though.
- ipmitool has no desktop file, and is primarily used via the
  command-line on servers

[Dependencies]
- No further depends or recommends dependencies that are not yet in main

[Standards compliance]
- This package correctly follows FHS and Debian Policy

[Maintenance/Owner]
- Owning Team will be Ubuntu Server
- Team is already subscribed to the package

- This does not use static builds
- This does not use vendored code

[Background information]
The Package description explains the package well
Upstream Name is ipmitool
Link to upstream project https://github.com/ipmitool/ipmitool

Tags: sec-1107

Related branches

CVE References

Lena Voytek (lvoytek)
description: updated
Lena Voytek (lvoytek)
description: updated
Changed in ipmitool (Ubuntu):
milestone: none → ubuntu-22.08
Changed in ipmitool (Ubuntu):
assignee: nobody → Ioanna Alifieraki (joalif)
Revision history for this message
Ioanna Alifieraki (joalif) wrote :
Download full text (3.8 KiB)

Review for Package: ipmitool

[Summary]

MIR team ACK under the constraint to resolve the below listed
required TODOs and as much as possible having a look at the
recommended TODOs.

This does need a security review.

List of specific binary packages to be promoted to main: ipmitool_1.8.18-11ubuntu2

Notes:

- Team is already subscribed

Required TODOs:
1. Package lacks tests. The lack of tests is understandable due to the nature of the
tool (requires hardware). In this case the subscribed team should provide a test plan.
Copy from https://wiki.ubuntu.com/MainInclusionProcess#Main_Inclusion_requirements,
section [Quality assurance - testing] :
the subscribed team must provide a written test plan in a comment to the MIR bug, and
commit to running that test either at each upload of the package or at least once each
release cycle. In the comment to the MIR bug, please link to the codebase of these tests
(scripts or doc of manual steps) and attach a full log of these test runs. This is meant to
assess their validity (e.g. not just superficial)"

Recommended TODOs:
2. Both upstream and Ubuntu builds have many warnings (mostly type related).
It would be nice, if possible, to address some of those.

[Duplication]
There is no other package in main providing the same functionality.

[Dependencies]
OK:
- no other Dependencies to MIR due to this
  - ipmitool checked with `check-mir`
  - all dependencies can be found in `seeded-in-ubuntu` (already in main)
  - none of the (potentially auto-generated) dependencies (Depends
    and Recommends) that are present after build are not in main
- no -dev/-debug/-doc packages that need exclusion
- No dependencies in main that are only superficially tested requiring
  more tests now.

Problems: None

[Embedded sources and static linking]
OK:
- no embedded source present
- no static linking
- does not have odd Built-Using entries
- not a go package, no extra constraints to consider in that regard
- No vendoring used, all Built-Using are in main

Problems: None

[Security]
OK:
- history of CVEs does not look concerning
- does not use webkit1,2
- does not use lib*v8 directly
- does not process arbitrary web content
- does not use centralized online accounts
- does not integrate arbitrary javascript into the desktop
- does not deal with system authentication (eg, pam), etc)
- does not deal with security attestation (secure boot, tpm, signatures)

Problems:
- does open a port/socket
- does deal with cryptography (en-/decryption, certificates, signing, ...)
- does not parse data formats (files [images, video, audio,
  xml, json, asn.1], network packets, structures, ...) from
  an untrusted source.
- does run a daemon as root

[Common blockers]
OK:
- does not FTBFS currently
- no new python2 dependency

Problems:
- does not have a test suite that runs at build time
- does not have a non-trivial test suite that runs as autopkgtest

[Packaging red flags]
OK:
- Ubuntu does carry a delta, but it is reasonable and maintenance under
  control
- symbols tracking not applicable for this kind of code.
- d/watch is present and looks ok (if needed, e.g. non-native)
- Upstream update history is good
- Debian/Ubuntu update his...

Read more...

Changed in ipmitool (Ubuntu):
status: New → Incomplete
Changed in ipmitool (Ubuntu):
assignee: Ioanna Alifieraki (joalif) → Ubuntu Security Team (ubuntu-security)
tags: added: sec-1107
Changed in ipmitool (Ubuntu):
status: Incomplete → New
Revision history for this message
Mark Esler (eslerm) wrote (last edit ):
Download full text (3.8 KiB)

Receiving consistent FRU (Field Replaceable Unit) information is critical to managing IPMI. Open GitHub issues such as "`fru print` exit status depends on the last processed item" gives me strong reservations about this package. I ended the review prematurely after reading build logs and reading through upstream's GitHub repo.

These are my notes.

* create a new no-change rebuild of ipmitool against openssl3 security updates
* Debian has not updated in awhile
  * https://bugs.launchpad.net/ubuntu/+source/ipmitool/+bug/1971281
* are all patches still relevant?
* upstream repo: https://github.com/ipmitool/ipmitool/
* tests could be built with https://github.com/ipmitool/fake-ipmistack
  * also see https://github.com/ipmitool/ipmitool/pull/338
* related tools in main: freeipmi, openipmi, and ipmiview
* related tools in universe: freeipmi

* github issues and pull requests:
  * 82 open issues and 54 open pull requests
  * many issues may relate to discrepancies caused by BMC
  * pull requests to fix issues are not being reviewed
  * several password related
    * https://github.com/ipmitool/ipmitool/issues/347
    * https://github.com/ipmitool/ipmitool/issues/229 (also see PR #243)
  * dev on exit codes:
    * "I'd say that ipmitool is generally very inconsistent about exit codes, and needs major refactoring regarding that."
    * https://github.com/ipmitool/ipmitool/issues/326
  * PRs are force merged and not closed--difficult to tell state of project
    * appears that build tests fail and block merge, so maintainers force push patches and leave PR open (?)
    * https://github.com/ipmitool/ipmitool/pull/63
    * https://github.com/ipmitool/ipmitool/pull/214
    * https://github.com/ipmitool/ipmitool/pull/110
    * https://github.com/ipmitool/ipmitool/pull/171
  * many PRs being blocked by CodeFactor
      * e.g., https://github.com/ipmitool/ipmitool/pull/338/checks?check_run_id=5764904551
  * PRs to patch FRU code discouaged by devs
    * https://github.com/ipmitool/ipmitool/pull/209
    * """I'm not surpised. As I said here: #191 (comment), the fru code is inherently awful. In general it's a "HERE BE DRAGONS" territory. I'm not sure I will accept your PR before the rewrite of fru is done."""
    * From referenced comment:
      * "The whole fru support is rusty, buggy, spaghetti-like and generally awful."
      * https://github.com/ipmitool/ipmitool/pull/191#issuecomment-659721389
  * claim that CVE-2020-5208 patch created unsolved regression
    * https://github.com/ipmitool/ipmitool/pull/191#issuecomment-661109548

* many -Wsign-compare and -Wpointer-sign warnings during build
  * e.g., helper.c's __min definition has sign comparison warning. __min variable used by memcpy often
  * -Wsign-compare warning in 'ipmi_gendev_write_file' during `if(fileLength != eeprom_size)` (!!!)
* many -Wformat, -Wlto-type-mismatch, -Wmaybe-uninitialized warnings
* many -Warray-bounds, especially in ipmp_fru.c
* -Wtype-limits (ipmi_ime.c:895 always false)
* code in ipmi_fru.c `if (((header.offset.internal * 8) > (header.offset.internal * 8)) &&` always False
  * dates back to 2005's 6514de2b139f58620bc08ef0659816c6b6ef44ef
  * pattern repeats many times acros...

Read more...

Changed in ipmitool (Ubuntu):
assignee: Ubuntu Security Team (ubuntu-security) → nobody
Mark Esler (eslerm)
Changed in ipmitool (Ubuntu):
status: New → Won't Fix
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks Mark,
The work for MIR and security review IMHO still was worth it. Both identified a bunch of things that need to be resolved (upstream and in the packaging) before it can be re-considered (which is much better than the former "was bad in the past, but who knows what would be needed").

Too bad that HW manufacturers can't unite on one of openipmi, freipmi, ipmitool and depending what HW you want to control you do you still need one or the other :-/

Despite the NACK we might still land a few identified improvements - like adding better self tests. After all a few people rely on it despite being in universe.

But we can't fix the upstream situation without a much bigger dedication of time/resources than what was planned. So after bug 1576812 in 2016-2017 and now this bug 1978144 in 2022 it has to stay a "Won't Fix" for now.

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Hello MAAS and archive admins :)

Does the ipmitool use in maas need to be discussed in light of https://lwn.net/Articles/926101/ saying that the archive has been locked and concerns raised during MIRs?

Thanks

Revision history for this message
Adam Collard (adam-collard) wrote : Re: [Bug 1978144] Re: [MIR] ipmitool

On Tue, 21 Mar 2023 at 15:47, Seth Arnold <email address hidden>
wrote:

> Hello MAAS and archive admins :)
>
> Does the ipmitool use in maas need to be discussed in light of
> https://lwn.net/Articles/926101/ saying that the archive has been locked
> and concerns raised during MIRs?
>

Hello Seth and Server,

Yes, this very much needs discussion and a plan forming!

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI: After a discussion with Dimitri and Adam we have this and the soon to be universe isc-dhcp based server only seeded in "community-maas" to avoid them showing up as component mismatch.

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.