Review for Source Package: iptables-persistent
Launchpad bug: https://bugs.launchpad.net/bugs/2170829
Target series: devel
Analysed source version: 1.0.24 (release pocket)
Binary packages: ipset-persistent, iptables-persistent, netfilter-persistent
[Summary]
OK:
- Review for Source Package: iptables-persistent
- All three built binaries need promotion from universe to main:
netfilter-persistent, iptables-persistent, and ipset-persistent. No binaries
are excluded from promotion.
(The source is currently published in universe, and none of its three binary
packages are already in main, so all three are listed for promotion. This is
informational for the reviewer and not a blocker.)
- Package has team subscriber(s): ubuntu-security
MIR team ACK under the constraint to resolve (see "Required TODOs")
This does need a security review, so I'll assign ubuntu-security
Required TODOs:
- #1 Add a build-time test suite (or autopkgtest) that validates the package's
shell scripts and configuration
- #2 does have a non-trivial test suite that runs as autopkgtest
To be clear, both are ideal but you likely want the VM based autopkgtest with
isolation-machine as restriction to really test this
Use reboot and autopkgtest reboot markers to see if the rules you set really
survive the boot.
So only resolving #2 would be considered sufficient if there is no great idea
for hwo to do #1.
Recommended TODOs:
- #3 Consider adding systemd isoaltion features to the service, it is very
purpose bound and could be okay with much less
[Rationale, Duplication and Ownership]
OK:
- There is no other package in main providing the same functionality.
(The candidates in main (iptables, ufw, nftables, ipset) are either the
filtering tools themselves or high-level firewall managers, not low-level
persistence mechanisms for saving and restoring raw netfilter rules at boot
time.)
- A team is committed to own long term maintenance of this package.
(The team-mapping evidence lists ubuntu-security as a subscribed team for
iptables-persistent, which constitutes strong evidence of ownership commitment.)
- The rationale given in the report seems valid and useful for Ubuntu
Problems: none
[Dependencies]
OK:
- no other build-time Dependencies with active code in the final binaries to
MIR due to this
(Build-Depends are limited to debhelper-compat, dh-exec, and po-debconf — all
packaging tooling with no code embedded in output. No vendored directories,
static binaries, Go/Rust lockfiles, or Built-Using/Static-Built-Using fields
were found, and all produced binaries are Architecture: all.)
- no -dev/-debug/-doc packages that need exclusion
- No dependencies in main that are only superficially tested requiring more
tests now.
(debconf has no autopkgtest but is a well-tested core component where
iptables-persistent only uses simple config prompts. ipset has autopkgtests
with passing results on amd64 and s390x; failures on
arm64/armhf/ppc64el/riscv64 should be monitored but do not block promotion as
ipset is already maintained in main.)
- Runtime dependencies from other source packages outside main: debconf-2.0,
but this is an alternative debconf | debconf-2-0 and the former is in main, no
real finding
Problems: none
[Embedded sources and static linking]
OK:
- 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
- Does not include vendored code
(No usual vendored directories (vendor/, third_party/, etc.) were found in
the source or shipped in the binaries; this is a native package consisting of
shell scripts, plugins, and a systemd service.)
Problems: none
[Security]
OK:
- history of CVEs does not look concerning
(Ubuntu CVE tracker, NVD, and cvelist all report zero CVEs for
iptables-persistent, with no historical CVEs from predecessor package names.
The package is a simple persistence wrapper rather than a complex network
filtering engine, which is consistent with a clean CVE history.)
- does not run a daemon as root
- does not use webkit1,2
- does not use lib*v8 directly
- does not parse data formats (files [images, video, audio, xml, json, asn.1],
network packets, structures, ...) from an untrusted source.
(The package consists of shell scripts (plugins and netfilter-persistent)
that invoke iptables-restore/ip6tables-restore/ipset restore on locally-managed
configuration files under /etc, which are owned by root. No runtime
dependencies are known parser libraries, and no vendored code or complex format
handling is present.)
The only source it has is what it saves itself, and that is root controlled
and thereby trusted
- does not expose any external endpoint (port/socket/... or similar)
(The package is a firewall rule persistence tool whose service runs as a
oneshot to restore and save iptables/ip6tables/ipset rules — it does not listen
on any port, socket, or network endpoint. The service file contents should be
confirmed to verify absence of ListenStream/ListenDatagram/socket activation
directives.)
- does not process arbitrary web content
(The package consists of shell scripts and plugins for saving/restoring
iptables, ip6tables, and ipset rules, with no web fetching, parsing, or
rendering capabilities. Its runtime dependencies (debconf, ipset,
netfilter-persistent) are likewise unrelated to web content processing.)
- does not use centralized online accounts
- does not integrate arbitrary javascript into the desktop
(This is a system administration package for firewall rule persistence with
no WebKit or JS engine dependencies, no desktop files, and no JavaScript
integration patterns in its source.)
- does not deal with system authentication (eg, pam), etc)
- does not deal with security attestation (secure boot, tpm, signatures)
(The source contains only firewall persistence shell scripts, a systemd
service, and debconf templates; no TPM, secureboot, pkcs11, or signature
patterns were found, and none of its runtime dependencies (debconf, ipset,
netfilter-persistent) relate to security attestation.)
- does not deal with cryptography (en-/decryption, certificates, signing, ...)
(The package has no runtime dependencies on crypto libraries (only debconf,
ipset, and same-source netfilter-persistent), and no crypto patterns were
detected in the source. This is consistent with its function as a firewall rule
persistence tool.)
Problems:
- The netfilter-persistent systemd service runs as root but ships with no
systemd hardening directives (no PrivateTmp, ProtectSystem, NoNewPrivileges,
CapabilityBounding, etc.), no AppArmor profile, and no seccomp filter. The
reviewer should judge whether adding at least basic isolation directives is
proportionate given the service's need to invoke iptables/ip6tables with
elevated privileges.
(A pattern search of the build and service files for common hardening
directives returned no matches; no AppArmor profiles are shipped; the service
executes as root to load and flush netfilter rules via a plugin architecture.
While root is likely necessary for netfilter management, the complete absence
of any isolation or privilege-restriction measures is worth reviewer
consideration.)
This is a standard finding, this is on early boot and needs root to load the
rules, appamor might not be present.
I consider it only nice (but never bad) to have to add systemd hardning on
this.
[Common blockers]
OK:
- does not FTBFS currently; Launchpad build records pass for arches: amd64,
amd64v3, arm64, armhf, i386, ppc64el, riscv64, s390x
- This does not need special HW for build or test
(iptables-persistent is a firewall rule persistence tool with standard build
dependencies (debhelper, dh-exec, po-debconf) and no exotic hardware
requirements; its functionality involves saving and restoring netfilter rules,
which can be tested on any standard system.)
- no special hardware needed, so there is no compromise to accept
- no new python2 dependency
- not a python package, no extra constraints to consider in that regard
- not a go package, no extra constraints to consider in that regard
Problems:
- No build-time test suite exists for this package. The reporter noted that no
upstream test suite or autopkgtests were found; the package is a native Debian
package consisting of shell scripts and configuration files, so the reviewer
should decide whether the absence is acceptable given the package's nature.
(The build rules consist solely of a minimal `dh $@` with no test wiring, and
the build log shows no test execution. The reporter's MIR content explicitly
states that no upstream test suite or autopkgtests were found, which explains
the gap but does not resolve the policy requirement.)
- No autopkgtest is declared or running for this package.
(The packaging contains no debian/tests/control, and the autopkgtest
infrastructure shows no test results for this package (on any architecture, in
any series). Both evidence sources agree that no autopkgtest exists.)
- Hard to decide whether E2E autopkgtest coverage is required for
iptables-persistent; the package has no autopkgtest and zero reverse-dependency
consumers, so no indirect coverage exists. A reviewer must determine if this is
acceptable for a firewall-persistence configuration package or if an
autopkgtest should be added.
(Can't decide: The package has no autopkgtest, and the reverse-dependency
analysis found zero consumer source packages, meaning there is no path to
indirect E2E coverage via consumers.)
I think an autopkgtets should be added, set this as required TODO.
[Packaging red flags]
OK:
- This is an Ubuntu-only package
(The package uses source format 3.0 (native) and the delta adapter reports
delta_kind "native" with delta_category "ubuntu-only", indicating no Debian
base exists to compare against. The source README confirms this is an
intentional native package design.)
- symbols tracking not applicable for this kind of code
(the package ships no shared library (.so), so ABI symbol tracking does not
apply)
- Upstream update history is (good/slow/sporadic)
(The release cadence descriptor rates this as 'good'; the package has seen
consistent maintenance since 2010 with no signs of abandonment, which is
appropriate for a mature, stable infrastructure tool. The upstream tracker
returned no direct data, but the Ubuntu/Debian publishing history provides
sufficient evidence of a healthy release trajectory.)
- Debian/Ubuntu update history is (good/slow/sporadic)
(The computed release cadence descriptor is 'good' (38 releases spanning 5707
days, averaging one upload every ~154 days), which meets the threshold of
roughly one or more uploads per six months. No upstream tracker data was
available for comparison, but the distro cadence alone is sufficient per
policy.)
- promoting this does not seem to cause issues for MOTUs that so far maintained
the package
(The package has no individual uploaders and no recorded Ubuntu upload
history, and all published versions lack an ubuntuN delta, indicating
sync-from-Debian maintenance. No MOTU member would lose upload access because
no one regularly uploads Ubuntu-specific changes.)
- no excessive lintian warnings
- debian/rules is rather clean
(The rules file contains only the standard shebang and %: dh $@ pattern with
zero overrides, which is the cleanest possible debhelper configuration.)
- It is not on the lto-disabled list
- debian/control defines a correct Maintainer field
- Non-native package but debian/watch not found - but also not needed as this
is a Debian native package
Problems: none
[Upstream red flags]
OK:
- no Errors/warnings during the build
- no incautious use of malloc/sprintf (the language has no direct MM)
(The source tree contains only shell scripts, configuration files,
translation files, and a minimal Makefile; build dependencies are limited to
debhelper, dh-exec, and po-debconf with no compiled language toolchain. The
language used has no direct memory management, so the check is satisfied by
TODO-B.)
- no use of sudo, gksu, pkexec, or LD_LIBRARY_PATH (usage is OK inside tests)
- no use of user 'nobody' outside of tests
- no use of setuid / setgid
- no important open bugs (crashers, etc) in Debian or Ubuntu
(The only substantive open Launchpad bug is a conffile prompt on upgrade
(Undecided importance, not a crasher), while Debian BTS and upstream report
zero open issues; no critical or security bugs were identified in any tracker.)
- no dependency on webkit, qtwebkit or libseed
- not part of the UI for extra checks
(The package is a system administration tool (section: admin) that ships a
systemd service for persisting firewall rules, with no GUI toolkit dependencies
and no desktop-facing characteristics.)
- not user-visible, translations not needed
Problems: none
** Changed in: iptables-persistent (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/2170829
Title:
[MIR] iptables-persistent
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iptables-persistent/+bug/2170829/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs