[MIR] ell

Bug #1971738 reported by Sebastien Bacher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ell (Ubuntu)
Fix Released
High
Unassigned

Bug Description

[Availability]
The package ell is already in Ubuntu universe.
The package ell build for the architectures it is designed to work on.
It currently builds and works for architetcures: amd64 arm64 armhf ppc64el riscv64 s390x
Link to package https://launchpad.net/ubuntu/+source/ell

[Rationale]
- The package ell is required in Ubuntu main as a depends of iwd which it is going to replace wpa as our default wireless daemon
- The package ell is required in Ubuntu main no later than aug 25 due to feature freeze

[Security]
- Had 1 security issues in the past
  - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-36081
  - https://ubuntu.com/security/CVE-2021-36081
which is marked as needs triage in Ubuntu

- no `suid` or `sgid` binaries
- no executables in `/sbin` and `/usr/sbin`
- Package does not install services, timers or recurring jobs
- Packages does not open privileged ports (ports < 1024)
- Packages does not contain extensions to security-sensitive software

[Quality assurance - function/usage]
- The package works well right after install

[Quality assurance - maintenance]
- The package is maintained well in Debian/Ubuntu and has no open reports
  - Ubuntu https://bugs.launchpad.net/ubuntu/+source/ell/+bug
  - Debian https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ell
- The package does not deal with exotic hardware we cannot support

[Quality assurance - testing]
- The package runs a test suite on build time, if it fails
  it makes the build fail, link to build log https://launchpadlibrarian.net/599097548/buildlog_ubuntu-kinetic-amd64.ell_0.50-1_BUILDING.txt.gz

============================================================================
Testsuite summary for ell 0.50
============================================================================
# TOTAL: 40
# PASS: 40

- The package does not run an autopkgtest, patch submitted to Debian to add one https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010669

and added to Ubuntu now
https://autopkgtest.ubuntu.com/packages/e/ell

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

- Lintian has only minor warnings, https://lintian.debian.org/sources/ell
- Lintian overrides are not present

- This package does not rely on obsolete or about to be demoted packages.
- This package has no python2 or GTK2 dependencies

- The package will be installed by default, but does not ask debconf
- Packaging and build is easy, link to d/rules https://salsa.debian.org/debian/ell/-/blob/debian/sid/debian/rules

[UI standards]
- Application is not end-user facing (does not need translation)

[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]
- desktop-packages is not yet, but will subscribe to the package before promotion

- This does not use static builds
- This does not use vendored code
- The package has been built in the archive more recently than the last test rebuild

[Background information]
The Package description explains the package well
Upstream Name is ell
Link to upstream project https://git.kernel.org/pub/scm/libs/ell/ell.git/

Tags: sec-1041

CVE References

description: updated
Changed in ell (Ubuntu):
importance: Undecided → High
Lukas Märdian (slyon)
Changed in ell (Ubuntu):
assignee: nobody → Christian Ehrhardt  (paelzer)
Changed in ell (Ubuntu):
milestone: none → ubuntu-22.08
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (4.1 KiB)

Review for Package: ell

[Summary]
It replicates functionality that exists otherwise, but in a scope that
we do not have in an alternate form. Other than that it seems to be
nice and trimmed to just the function it is advertising.
=> MIR team ACK

This does need a security review, so I'll assign ubuntu-security

List of specific binary packages to be promoted to main: ell
Specific binary packages built, but NOT to be promoted to main: <none>

Required TODOs:
- none
Recommended TODOs:
- none

[Duplication]
Well - the whole base system system is what is duplicated in this library.
dhcp requests, icmp handling, tls, netlink, ... many more things that a base
system would do are essentially re-implemented as a library (instead of
independent tools/services) here. That is some duplication, but it is done
in a way to provide those as a lib/binding interface as used by IWD.
And in that use-case/context there is no duplication in Ubuntu main yet.

Problems: None

[Dependencies]
OK:
- no other Dependencies to MIR due to this
- -dev package will be auto-promoted but also has sane dependencies
- 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 (just a kernel header for gpio)
- no static linking
  One common way to use ell is static linking, but nowadays it does allow
  to be a dynamic lib and that is how it e.g. is used from iwd
- does not have odd Built-Using entries
- not a go package, no extra constraints to consider in that regard

Problems: None

[Security]
OK:
- history of CVEs does not look concerning (unless we consider having none
  as concerning since the functionality it covers usually has CVEs)
- does not run a daemon as root
- 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 parse data formats (most of the functions interact with some remote
  component)
- does open a port/socket (for some functions)
- While not having CVEs yet, in general this covers a lot of things like dhcp,
  dbus or many others that are known to be epxloited in other places. So the
  assumption should be that there is a reasonable attack surface here as well.

[Common blockers]
OK:
- does not FTBFS currently
- does have a test suite that runs at build time
  - test suite fails will fail the build upon error.
- No need for special HW to test
- no new python2 dependency

Problems:
- does not have a non-trivial test suite that runs as autopkgtest
  - a non-trivial test on this level does not make sense (the lib alone
    is only doing rather simple things), but there is an autopkgtest in iwd
    which is the context that pulls this into main.
    I think there is no strong need to require or recommend to add an
    autopkgtest on this level as well.

[Packaging red flags]
OK:
- Ubuntu does not carry a delta
- symbols tracking is in place
- d/watch is presen...

Read more...

Changed in ell (Ubuntu):
assignee: Christian Ehrhardt  (paelzer) → Ubuntu Security Team (ubuntu-security)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This really LGTM, but it needs security review as well.

FYI: I've also set the milestone to match was mentioned in the initial report.

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

Hmm this thing seems to have its own TLS stack https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/tls.c

as well as rc4 and rc2 implementations https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/cipher.c

Does Intel have any guidance on this thing being certified FIPS / CC / STIG / etc?

Thanks

Revision history for this message
Sebastien Bacher (seb128) wrote :

One 'detail' I noticed today while checking for other things, bluez which is in main includes a copy of ell which it is using. It has an option to use an external ell instead.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: [Bug 1971738] Re: [MIR] ell

On Wed, May 18, 2022 at 12:51 AM Seth Arnold <email address hidden> wrote:
>
> Hmm this thing seems to have its own TLS stack
> https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/tls.c

Yeah, as I've written it reimplements all base functions of a small
system in the lib.

Revision history for this message
Sebastien Bacher (seb128) wrote :

We have added a simple autopkgtest to test a build with the lib to validate the basic and depends

https://autopkgtest.ubuntu.com/packages/e/ell

description: updated
tags: added: sec-1041
Changed in ell (Ubuntu):
status: New → In Progress
assignee: Ubuntu Security Team (ubuntu-security) → Camila Camargo de Matos (ccdm94)
Revision history for this message
Camila Camargo de Matos (ccdm94) wrote :
Download full text (14.6 KiB)

I reviewed ell 0.50-1ubuntu2 as checked into kinetic. This shouldn't be considered a full audit but rather a quick gauge of maintainability.

ell is the Embedded Linux Library. It is a library similar to GNOME Glib which allows for application development in C, providing, for example, core low-level functionalities for Linux system daemons. It is lightweight and therefore, a better fit for usage in Embedded Linux applications.

- CVE History:
  - It was previously mentioned in this bug that this package is vulnerable to CVE-2021-36081. This CVE, however, seems to instead be associated to the software tesseract, and not to ell. There are no patches provided by ell's upstream, only tesseract's upstream, and the patches do not relate at all to the implementation of ell. The only thing that seems to be ell-related in this CVE is the presence of the term 'one_ell_conflict' in the CVE description. Therefore, it will be considered that this software has no CVEs associated with it.
- Dependencies:
  - According to debian/control, package build depends on dbus-daemon, debhelper-compat (= 13) and libglib2.0-dev. The software also depends on the GNU C library.
  - There are no encryption libraries listed in the dependencies, however, ell does use the Kernel's Crypto API in order to perform a lot of its encryption operations. A lot of certificate management is implemented by ell directly. Given this information, it is important to mention that the 'About' section in ell's git mentions the need for a Linux kernel with support for epoll and timerfd, as well as if_alg for checksum usage and enablement of the keyctl() syscall for usage of Diffie-Hellman. As per https://git.kernel.org/pub/scm/libs/ell/ell.git/about/:

                Kernel configuration checklist:

                        CONFIG_TIMERFD=y
                        CONFIG_EVENTFD=y

                        CONFIG_CRYPTO_USER_API=y
                        CONFIG_CRYPTO_USER_API_HASH=y
                        CONFIG_CRYPTO_MD5=y
                        CONFIG_CRYPTO_SHA1=y

                        CONFIG_KEY_DH_OPERATIONS=y

    These seem to be enabled by default in the Linux Kernel for Kinetic, except for CONFIG_CRYPTO_USER_API and CONFIG_CRYPTO_USER_API_HASH, which are set as 'm'.
  - DBus is needed to run the tests, which are also run during build.
- No pre/post inst/rm scripts.
- No init scripts.
- No systemd units (this is a library package).
- No dbus services (this is a library package).
- No setuid binaries (source package includes a 'tools' directory, but these do not seem to be installed).
- No sudo fragments.
- No polkit files.
- No udev rules.
- No cron jobs (this is a library package).
- Library installation path:
    /usr/lib/x86_64-linux-gnu/libell.a
    /usr/lib/x86_64-linux-gnu/libell.so.0.0.2
    /usr/lib/x86_64-linux-gnu/libell.so
    /usr/lib/x86_64-linux-gnu/libell.so.0
- The package does include unit tests. The tests run smoothly in kinetic and generate visible and understandable results, which is good when performing regression tests after application of a patch. The process to run these tests is easy (running a 'make check' command), with no external tools or configurat...

Changed in ell (Ubuntu):
assignee: Camila Camargo de Matos (ccdm94) → nobody
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

only desktop-packages need to be subscribed, I will let that to seb when he promotes it.

Changed in ell (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

The source had already been promoted it seems, I subscribed the desktop-packages team and promoted libell0 now

Changed in ell (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.