[MIR] libemail-simple-perl ( libemail-mime-perl dependency as libmail-dmarc-perl dependency)

Bug #2031491 reported by Miriam España Acebal
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libemail-simple-perl (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Availability]
The package libemail-simple-perl is already in Ubuntu universe.
The package libemail-simple-perl build for the architectures it is designed to work on.
It currently builds and works for architectures: amd64 (all)
Link to package https://launchpad.net/ubuntu/+source/libemail-simple-perl

[Rationale]
The package libemail-simple-perl is required in Ubuntu main for libemail-mime-perl.
The package libemail-simple-perl will not generally be useful for a large part of
our user base, but is important/helpful still because it is required as runtime dependency by libemail-mime-perl,
(MIR bug https://bugs.launchpad.net/ubuntu/+source/libemail-mime-perl/+bug/2030880),
and this, in turn, is required as runtime dependency by libmail-dmarc-perl
( libmail-dmarc-perl is in the MIR process here: https://bugs.launchpad.net/ubuntu/+source/libmail-dmarc-perl/+bug/2023971 )

The package libemail-simple-perl is required in Ubuntu main no later than through the same scheduled requested for the libemail-mime-perl and libmail-dmarc-perl promotion, since libemail-mime-perl depends on it.

[Security]
No CVEs/security issues in this software in the past.
No `suid` or `sgid` binaries.
No executables in `/sbin` and `/usr/sbin`.
Package does not install services, timers or recurring jobs.
Package does not open privileged ports (ports < 1024).
Package does not expose any external endpoints.
Package does not contain extensions to security-sensitive software (filters, scanners, plugins, UI skins, ...);
it's a wrapper for other enconding perl modules.

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

[Quality assurance - maintenance]
The package is maintained well in Debian/Ubuntu and does
not have too many, long-term & critical, open bugs:
   - Ubuntu (0) https://bugs.launchpad.net/ubuntu/+source/libemail-simple-perl/+bug
   - Debian (0) https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=libemail-simple-perl
   - Upstream's bug tracker (5) https://github.com/rjbs/Email-Simple/issues
     + Upstream's repo last activity:
       - last commit: in main, Jan 9, 2023
       - Issues without answer: 2, since Dec 16, 2021
       - Updated issue: Feb 27, 2020
       - fixed/closed/merged issue: Nov 3, 2020

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: https://launchpadlibrarian.net/646110119/buildlog_ubuntu-lunar-amd64.libemail-simple-perl_2.218-1_BUILDING.txt.gz :

      dh_auto_test
    make -j4 test TEST_VERBOSE=1
   make[1]: Entering directory '/<<PKGBUILDDIR>>'
   PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t

The package runs an autopkgtest (via autodep8 using 'Testsuite: autopkgtest-pkg-perl' in d/control file - https://git.launchpad.net/ubuntu/+source/libemail-simple-perl/tree/debian/control#n7 -),
that runs essentialy the above build-time test suite. It is currently passing on
this list of architectures (amd64, arm64, armhf, ppc64el, riscv64, s390x), except on i386: https://autopkgtest.ubuntu.com/packages/l/libemail-simple-perl

The package does have failing autopkgtests tests right now, but since
they always failed they are handled as "ignored failure", this is
because the package the test depends on pkg-perl-tools package that is not
build for i386 since focal.

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

debian/control defines a correct Maintainer field : Debian Perl Group <email address hidden> ( https://git.launchpad.net/ubuntu/+source/libemail-simple-perl/tree/debian/control#n2)

This package does not yield massive lintian Warnings, Errors
  - recent build log of the package https://launchpadlibrarian.net/646110119/buildlog_ubuntu-lunar-amd64.libemail-simple-perl_2.218-1_BUILDING.txt.gz
  - full output from `lintian --pedantic` :
    #source
    ❯ lintian -EvIL +pedantic --show-overrides
      E: libemail-simple-perl changes: bad-distribution-in-changes-file mantic
      W: libemail-simple-perl: changelog-distribution-does-not-match-changes-file (unstable != mantic)
      W: libemail-simple-perl changes: distribution-and-changes-mismatch mantic unstable
   #binary
   ❯ lintian -EvIL +pedantic --show-overrides ../libemail-simple-perl_2.218-1.dsc
     W: libemail-simple-perl source: newer-standards-version 4.6.2 (current is 4.6.0.1)
     X: libemail-simple-perl source: debian-watch-does-not-check-gpg-signature [debian/watch]

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, link to debian/rules: https://git.launchpad.net/ubuntu/+source/libemail-simple-perl/tree/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 (4.6.2)

[Maintenance/Owner]
Owning Team will be Ubuntu Server Team.
Team is not yet, but will subscribe to the package before promotion.
This does not use static builds.
This does not use vendored code.
This package is not rust based.

The package successfully built during the most recent test rebuild : https://launchpad.net/ubuntu/+archive/test-rebuild-20230515-lunar-v3/+build/26135443/+files/buildlog_ubuntu-lunar-amd64.libemail-simple-perl_2.218-1_BUILDING.txt.gz

[Background information]
The Package description explains the package well.
Upstream Name is Email-Simple .
Link to upstream project https://metacpan.org/dist/Email-Simple

This has been in the archive since at least 2005 (1.9-1). It's never had a bug filed against it in Launchpad.

Changed in libemail-simple-perl (Ubuntu):
status: Incomplete → New
Changed in libemail-simple-perl (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
Revision history for this message
Lukas Märdian (slyon) wrote :
Download full text (4.1 KiB)

Review for Source Package: libemail-simple-perl

[Summary]
A Perl module to parse RFC2822 email headers and message format.

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, so I'll assign ubuntu-security

List of specific binary packages to be promoted to main: libemail-simple-perl
Specific binary packages built, but NOT to be promoted to main: None

Notes:
#0 I'm requesting security review, due to the package parsing random email data.

Required TODOs:
#1 libmailtools-perl looks like a potential duplicate
=> Please differentiate the two or consider if this could be used instead.

Recommended TODOs:
#2 The package should get a team bug subscriber before being promoted
#3 Upstream & Debian/Ubuntu update history is sporadic
=> Maybe we can do a better job of at least packaging new versions in a timely
   manner, once this is in main. There are not too frequent releases upstream.

[Duplication]
$ rmadison -c main -s mantic {libmailtools-perl,libemail-address-perl,libcourriel-perl,libmail-rfc822-address-perl}
 libmailtools-perl | 2.21-2 | mantic | source, all

Problems:
- libmailtools-perl looks like a potential duplicate, could you please differentiate the two or consider if this could be used instead?

[Dependencies]
OK:
- no other Dependencies to MIR due to this
  - SRCPKG 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 unexpected Built-Using entries
- not a go package, no extra constraints to consider in that regard
- not a rust package, no extra constraints to consider in that regard

Problems: None

[Security]
OK:
- history of CVEs does not look concerning
- does not run a daemon as root
- does not use webkit1,2
- does not use lib*v8 directly
- does not expose any external endpoint (port/socket/... or similar)
- 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)
- does not deal with cryptography (en-/decryption, certificates, signing, ...)

Problems:
- does not parse data formats (emails, headers, RFC2822) from an untrusted source.
- does not process arbitrary web content (can emails be considered as such?)

[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.
- does have a non-trivial test suite that runs as autopkgtest
- This does not need special HW for build or test
- no new python2 dependency
- Not a Python package
- Not a Go package

Problems: None

[Packaging red flags]
OK:
- Ubuntu does not carr...

Read more...

Revision history for this message
Lukas Märdian (slyon) wrote :

Incomplete, as I'd like to clarify the potential duplicate. But I'm already moving it towards security review.

Changed in libemail-simple-perl (Ubuntu):
status: New → Incomplete
assignee: Lukas Märdian (slyon) → Ubuntu Security Team (ubuntu-security)
tags: added: sec-2674
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (6.3 KiB)

> Required TODOs:
> #1 libmailtools-perl looks like a potential duplicate
> => Please differentiate the two or consider if this could be used instead.

That is a good question, they are actually not the same but the same. Let me explain.
There are two mail stacks in perl `libmail` and `libemail`.

libmail*
libmail-authenticationresults-perl - object oriented Authentication-Results headers
libmail-dkim-perl - module to cryptographically identify the sender of email
libmail-sendmail-perl - simple way to send email from a perl script
libmail-spf-perl - Perl implementation of Sender Policy Framework and Sender ID
libmailtools-perl - modules to manipulate email in perl programs
libmail-box-imap4-perl - perl module for handling of IMAP4 folders as client
libmail-box-perl - message-folder management module
libmail-box-pop3-perl - POP3 handler for Mail::Box
libmail-bulkmail-perl - Platform independent mailing list module
libmail-checkuser-perl - Perl module for checking email addresses for validity
libmail-chimp3-perl - interface to mailchimp.com's RESTful Web API v3
libmail-deliverystatus-bounceparser-perl - module for analyzing bounce messages
libmail-dmarc-perl - Perl implementation of DMARC
libmail-field-received-perl - mostly RFC822-compliant parser of Received headers
libmail-gnupg-perl - Perl module for processing email with GPG
libmail-imapclient-perl - Perl library for manipulating IMAP mail stores
libmail-imaptalk-perl - IMAP client interface with lots of features
libmail-listdetector-perl - module for detecting mailing list messages
libmail-mbox-messageparser-perl - Perl module for processing mbox folders
libmail-mboxparser-perl - module providing read-only access to UNIX mailboxes
libmail-message-perl - generic class representing mail messages (perl library)
libmail-milter-perl - Perl extension modules for mail filtering via milter
libmail-pop3client-perl - POP3 client module for perl
libmail-rbl-perl - Perl extension to access RBL-style host verification services
libmail-rfc822-address-perl - Perl extension for validating email addresses
libmail-sendeasy-perl - Perl module to send plain/html e-mails through SMTP servers
libmail-spf-xs-perl - library for validating mail senders with SPF - Perl bindings
libmail-srs-perl - interface to Sender Rewriting Scheme
libmail-thread-perl - library for threading email by In-Reply-To and References
libmail-transport-perl - perl library for sending email
libmail-verify-perl - Utility to verify an email address
libmail-verp-perl - Variable Envelope Return Paths (VERP) address encoder/decoder

libemail*
libemail-address-xs-perl - Perl library for RFC 5322 address/group parsing and formatting
libemail-date-format-perl - Module to generate RFC-2822-valid date strings
libemail-abstract-perl - unified interface to mail representations
libemail-address-list-perl - RFC close address list parsing
libemail-address-perl - Perl module for RFC 2822 address parsing and creation
libemail-date-perl - Perl module for correct formatting of dates in emails
libemail-filter-perl - library for creating easy email filters
libemail-find-perl - module to find RFC 822 email addresses in plain text
libemail-folder-perl - Perl m...

Read more...

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

Agreed to be no duplicate in MIR meeting, setting to "new".
it is already in the security queue.

Changed in libemail-simple-perl (Ubuntu):
status: Incomplete → New
Revision history for this message
Miriam España Acebal (mirespace) wrote :

TODO #2: Server Team's subscription to the bug requested on the MP attached to the bug.
TODO #3: I agree.

Revision history for this message
George-Andrei Iosif (iosifache) wrote :
Download full text (4.2 KiB)

I reviewed `libemail-simple-perl` `2.218-1` as checked into mantic. This
shouldn't be considered a full audit but rather a quick gauge of
maintainability.

`libemail-simple-perl` is a Perl module that deals with parsing RFC2822 headers
and message format. The RFC defined the syntax for text-based "electronic mail"
messages. It obsoleted RFC 822 and was obsoleted by RFC 5322.

The package provides a Perl module that exposes an object with two constructors:
- `Email::Simple->new`, which parses a string that represents the email; and
- `Email::Simple->create`, which takes multiple parameters for each
characteristic of the email (for example, `body`).

All members and methods of the object are listed here:
https://metacpan.org/pod/Email::Simple#METHODS.

- CVE History
  - No CVE assigned
  - There is no security issue listed in the `CHANGELOG` or reported in the
GitHub issues (`rjbs/Email-Simple`).
  - In the past, there were algorithmic complexity issues
(`rjbs/Email-Simple#8` and `8b6843d55296783ba28e679a877853dff5a17be6`) that
eventually ended up impacting the availability of the module and the
applications using it. These were fixed rapidly and with minimal changes, so
they imply minimal security concerns.
- Build-Depends
  - The single dependency that the module has is `libemail-date-format-perl`.
It is only called once, for getting an RFC 2822-formatted date string.
- pre/post inst/rm scripts
  - N/A
- init scripts
  - N/A
- systemd units
  - N/A
- dbus services
  - N/A
- setuid binaries
  - N/A
- binaries in PATH
  - N/A
- sudo fragments
  - N/A
- polkit files
  - N/A
- udev rules
  - N/A
- unit tests / autopkgtests
  - N/A
- cron jobs
  - N/A
- Build logs
  - N/A

- Processes spawned
  - N/A
- Memory management
  - N/A
- File IO
  - The module operates only with parameters (for example, the email to be
parsed), so no files are involved at all in the code of the module.
  - Files are opened only in the tests from the `t/` folder.
- Logging
  - The module uses `croak()` and `carp()` from the `Carp` module to create
warnings or errors. The original filename and line number (pointing to the
implementation of the library) are changed with the details of the caller from
the user script.
- Environment variable usage
  - N/A
- Use of privileged functions
  - N/A
- Use of cryptography / random number sources etc
  - N/A
- Use of temp files
  - N/A
- Use of networking
  - N/A
- Use of WebKit
  - N/A
- Use of PolicyKit
  - N/A

- Any significant cppcheck results
  - N/A
- Any significant Coverity results
  - Coverity doesn't have support for Perl (as per Coverity's SAT-27514 ticket).
- Any significant shellcheck results
  - N/A
- Any significant bandit results
  - N/A
- Any significant govulncheck results
  - N/A
- Any significant Semgrep results
  - N/A

Another aspect that was checked is the Regex processing (matching, splitting,
and substitution). The points at which injections may have been leading to a
Regex-based denial of service (ReDoS) were dynamically tested. They are safe.

The audit also leveraged fuzzing with an instrumented build of the Perl
interpreter, a custom harness, and AFL++. No issue was detected during the
...

Read more...

Changed in libemail-simple-perl (Ubuntu):
assignee: Ubuntu Security Team (ubuntu-security) → nobody
Revision history for this message
Lukas Märdian (slyon) wrote :

This seems ready for promotion

Changed in libemail-simple-perl (Ubuntu):
status: New → In Progress
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

It is and it is also in component mismatches now, updating state

Changed in libemail-simple-perl (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Full stack ready, all dependencies seen in component mismatches, FFE approved, MIR approved, only the top level change pulling this in is in -proposed and ready there other than this mismatch -> promoting.

Override component to main
libemail-simple-perl 2.218-1 in noble: universe/perl -> main
libemail-simple-perl 2.218-1 in noble amd64: universe/perl/optional/100% -> main
libemail-simple-perl 2.218-1 in noble arm64: universe/perl/optional/100% -> main
libemail-simple-perl 2.218-1 in noble armhf: universe/perl/optional/100% -> main
libemail-simple-perl 2.218-1 in noble i386: universe/perl/optional/100% -> main
libemail-simple-perl 2.218-1 in noble ppc64el: universe/perl/optional/100% -> main
libemail-simple-perl 2.218-1 in noble riscv64: universe/perl/optional/100% -> main
libemail-simple-perl 2.218-1 in noble s390x: universe/perl/optional/100% -> main
Override [y|N]? y
8 publications overridden.

Changed in libemail-simple-perl (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.