Review for Source Package: libavif
[Summary]
The essence of the review result from the MIR POV: libavif is a
well-maintained C library with clean packaging, good upstream practices, and a
valid rationale. However, it parses untrusted image data and requires a
security review. From my inspection, the rav1e and svt codecs have been
disabled and removed from Build-Depends. That leaves libdav1d and libgav1 as
dependencies in Universe that require an MIR.
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: libvif16
Specific binary packages built, but NOT to be promoted to main: libavif-dev,
libavif-bin (CLI tools), libavif-gdk-pixbuf (not required by pillow use case).
Notes:
Required TODOs:
1. libdav1d7 (from dav1d, universe) needs a separate MIR filed
and approved before promotion.
2. libgav1-2 (from libgav1, universe) needs a separate MIR filed
and approved before promotion.
[Rationale, Duplication and Ownership]
OK:
- There is no other package in main providing the same functionality.
libheif1 is in main and can handle HEIF containers with AV1 codec,
but it is a different library with a different API; libavif is the
AOMedia reference AVIF implementation and is what Pillow specifically
uses for AVIF support.
- A team (~debcrafters-packages) is committed to own long term
maintenance of this package.
- The rationale given in the report is valid and useful for Ubuntu:
python3-pil (Pillow) is in main and currently builds without AVIF
support because libavif-dev is in universe. Promoting libavif16
enables AVIF in Pillow and drops an Ubuntu delta.
Problems: None
[Dependencies]
OK:
- no -dev/-debug/-doc packages that need exclusion
- no build-time dependencies with active code in the final binaries
to MIR beyond what is already covered by runtime dependencies
- No dependencies in main that are only superficially tested requiring
more tests now.
Problems:
- libdav1d7 (from dav1d, universe) needs a separate MIR for promotion
- libgav1-2 (from libgav1, universe) needs a separate MIR for promotion
(note: only built/used on select architectures, not s390x)
- Note: The MIR bug lists librav1e and libsvtav1enc as needing MIRs, but
the current packaging (1.3.0-1ubuntu4) disables both codecs
(-DAVIF_CODEC_RAV1E=OFF, -DAVIF_CODEC_SVT=OFF)
[Embedded sources and static linking]
OK:
- not a go package, no extra constraints to consider in that regard
- not a rust package, no extra constraints to consider in that regard
- Does not include vendored code in the promoted binary (libavif16).
third_party/libyuv is stripped at build time and the system libyuv is
used instead. third_party/iccjpeg is only compiled into CLI tools
(libavif-bin, not promoted). libargparse is only used by an unpacked
utility.
- no static linking in the promoted binary
- does not have unexpected Built-Using entries
- no embedded source present in the promoted library
Problems: None
[Security]
OK:
- 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 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)
- does not deal with cryptography (en-/decryption, certificates,
signing, ...)
- history of CVEs is moderate (6 total, all fixed): a mix of integer
overflows, use-after-free, and out-of-bounds writes typical of C
image parsing libraries. All resolved in current version 1.3.0.
- DOES parse data formats (AVIF image files) from untrusted sources.
This is the primary use case — it will be used by python3-pil (Pillow)
to decode user-supplied AVIF images.
- This makes appropriate use of risk mitigation: hardening=+all is
enabled, upstream has Google OSS-Fuzz continuous fuzzing integration
with multiple fuzz targets, and memory allocation is centralized
through a wrapper.
Problems:
- This is a security-sensitive package (C library parsing complex
image data from untrusted sources) and needs a security team review.
[Common blockers]
OK:
- does not FTBFS currently
- does have a test suite that runs at build time
- test suite failures will fail the build upon error.
- 62 GoogleTest source files covering decode, encode, animation,
color conversion, properties, allocation, and more.
- 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
Problems: None
[Packaging red flags]
OK:
- Ubuntu does carry a delta, but it is reasonable and maintenance under
control (disabling rav1e/svt codecs for main eligibility, adding tests,
no-change rebuild for SONAME bump).
- symbols tracking not applicable for this kind of code.
- debian/watch is present and looks ok
- Upstream update history is good (regular releases every 2-4 months)
- Debian/Ubuntu update history is good
- the current release is packaged (1.3.0 in resolute; 1.4.1 upstream)
- promoting this does not seem to cause issues for MOTUs that so far
maintained the package
- no massive Lintian warnings (clean on Debian lintian)
- debian/rules is rather clean (87 lines, dh + cmake)
- It is not on the lto-disabled list
Problems: None
[Upstream red flags]
OK:
- no incautious use of malloc/sprintf (as far as we can check it).
malloc is wrapped through avifAlloc() and return values are
consistently checked. No sprintf usage; only snprintf.
- no use of sudo, gksu, pkexec, or LD_LIBRARY_PATH
- no use of user 'nobody'
- no use of setuid / setgid
- no important open bugs (crashers, etc) in Debian or Ubuntu
- no dependency on webkit, qtwebkit or libseed
- not part of the UI for extra checks
- no translation present, but none needed for this case (shared
library and CLI tools with no user-visible UI)
Problems: None
** Changed in: libavif (Ubuntu)
Assignee: Myles Penner (mylesjp) => (unassigned)
** Changed in: libavif (Ubuntu)
Assignee: (unassigned) => Ubuntu Security Team (ubuntu-security)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2130005
Title:
[MIR] libavif
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libavif/+bug/2130005/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs