Description
Apport is the crash reporting system of Ubuntu, installed by default on servers and desktops.
When it runs, it registers itself as the kernel core dump handler (kernel.core_pattern set to
|/usr/share/apport/apport ...) and turns fs.suid_dumpable to 2. For every crash of a
packaged program it writes a report to /var/crash/ that holds the core dump, the command
line, environment details and logs. Whoopsie, installed on desktops of some releases, and the
apport-autoreport units upload these reports to Canonical's error tracker; apport-forward
receives crash data from containers.
This control sets enabled=0 in /etc/default/apport, stops and masks the apport and whoopsie
units, and checks that kernel.core_pattern no longer points to apport.
Removing the package (apt purge apport) also meets the goal, but ubuntu-server and other
metapackages depend on it: disabling keeps the standard package set intact. When apport is
stopped, it puts back kernel.core_pattern = core and fs.suid_dumpable = 0.
Rationale
Crash reports contain the memory of the process that crashed: passwords, keys, session tokens or personal data. They are stored on disk with broad readability for the user who crashed and for administrators, and can be uploaded to a third party without a data processing agreement. While apport runs, it also overrides the core dump settings of CB-UBU-BOOT-005 and CB-UBU-BOOT-013.
Impact
Crashes are no longer recorded in /var/crash/ and no longer offered for reporting. Bugs can
still be reported by hand with ubuntu-bug, which does not need the service. On desktops, the
"problem reporting" settings of GNOME have no effect anymore.
Setting
| Location | /etc/default/apport; units apport.service, apport-forward.socket, apport-autoreport.path, apport-autoreport.timer, whoopsie.service, whoopsie.path |
| Default | enabled=1, units enabled and running |
| Recommended | enabled=0, units masked and stopped |
Audit
- If apport is installed,
grep enabled /etc/default/apportmust showenabled=0. systemctl is-enabledmust printdisabledormasked, andsystemctl is-activemust not printactive, for each of these units that exists:apport.service,apport-forward.socket,apport-autoreport.path,apport-autoreport.timer,whoopsie.service,whoopsie.path.cat /proc/sys/kernel/core_patternmust not start with|/usr/share/apport/.
Automated: every check must pass. Scanners report each check by its id.
apport-config
Effective enabled= value in /etc/default/apport.
script: |
v=$(sed -n 's/^[[:space:]]*enabled[[:space:]]*=[[:space:]]*//p' /etc/default/apport 2>/dev/null | tail -n 1)
echo "enabled=${v:-1 (default)}"
[ "$v" = 0 ]
units
Crash reporting units are disabled or masked, and not running.
script: |
rc=0
for u in apport.service apport-forward.socket apport-autoreport.path apport-autoreport.timer whoopsie.service whoopsie.path; do
e=$(systemctl is-enabled "$u" 2>/dev/null)
case $e in "" | not-found) continue ;; esac
a=$(systemctl is-active "$u" 2>/dev/null)
echo "$u: $e, $a"
case $e in disabled | masked | masked-runtime) ;; *) rc=1 ;; esac
[ "$a" = active ] && rc=1
done
exit "$rc"
core-pattern
kernel.core_pattern does not send core dumps to apport.
script: |
p=$(cat /proc/sys/kernel/core_pattern) || exit 3
echo "$p"
case $p in "|/usr/share/apport/"*) exit 1 ;; esac
exit 0
Remediation
- In
/etc/default/apport, setenabled=0. - Stop and mask the units that exist:
systemctl mask --now apport.service apport-forward.socket apport-autoreport.path apport-autoreport.timer, and on desktopssystemctl mask --now whoopsie.service whoopsie.path. - Check that
/proc/sys/kernel/core_patternno longer starts with|/usr/share/apport/.
| Restart | none |
| Disruption | low |
Rollback
Set enabled=1 in /etc/default/apport, then systemctl unmask and systemctl enable --now
the units.
disable
# CB-UBU-BOOT-015: turn off apport and whoopsie. Idempotent.
f=/etc/default/apport
if [ -f "$f" ]; then
if ! grep -Eq '^[[:space:]]*enabled[[:space:]]*=[[:space:]]*0[[:space:]]*$' "$f" ||
grep -Eq '^[[:space:]]*enabled[[:space:]]*=[[:space:]]*[^0[:space:]]' "$f"; then
cb_backup "$f"
if grep -Eq '^[[:space:]]*enabled[[:space:]]*=' "$f"; then
sed -i -E 's/^[[:space:]]*enabled[[:space:]]*=.*/enabled=0/' "$f"
else
printf '%s\n' 'enabled=0' >>"$f"
fi
fi
fi
# Stop and mask every crash reporting unit that exists. Stopping apport puts back
# kernel.core_pattern = core and fs.suid_dumpable = 0.
for u in apport-autoreport.timer apport-autoreport.path apport-forward.socket whoopsie.path whoopsie.service apport.service; do
e=$(systemctl is-enabled "$u" 2>/dev/null)
case $e in "" | not-found) continue ;; esac
systemctl stop "$u" || exit 1
[ "$e" = masked ] || systemctl mask "$u" || exit 1
done
case $(cat /proc/sys/kernel/core_pattern) in
"|/usr/share/apport/"*) printf 'core\n' >/proc/sys/kernel/core_pattern ;;
esac
Handwritten code reads parameters from CB_<NAME> environment variables. Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.
References
- apport-bug(1), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- Ubuntu Server documentation - How to report a bug in Ubuntu Server Canonical, vendor-doc, accessed 2026-10-19
- Ubuntu Security documentation - Dangerous sysctls (kernel.core_pattern, fs.suid_dumpable) Canonical, vendor-doc, accessed 2026-10-19
- core(5), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| NIST SP 800-53 Rev. 55.1.1 | CM-7 | related | |
| NIST SP 800-53 Rev. 55.1.1 | SI-11 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
Related controls
- related
CB-UBU-BOOT-005Disable core dumps of setuid programs - related
CB-UBU-BOOT-013Disable core dumps
People and lifecycle
| Authors |
|
| Verified | 2026-10-19 by Sn0wAlice on 20.04, Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic, BIOS boot. Fails on a fresh install (enabled=1, apport init script active, core_pattern piped to apport); fix masks the units, core_pattern back to core, suid_dumpable to 0; kept after reboot; fix idempotent. |
| Verified | 2026-10-19 by Sn0wAlice on 22.04, Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic, BIOS boot. Fails on a fresh install (enabled=1, apport init script active, core_pattern piped to apport); fix masks the units, core_pattern back to core, suid_dumpable to 0; kept after reboot; fix idempotent. |
| Verified | 2026-10-19 by Sn0wAlice on 24.04, Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic, BIOS boot. Fails on a fresh install (enabled=1, apport.service and its socket, path and timer enabled, core_pattern piped to apport); fix masks the units, core_pattern back to core, suid_dumpable to 0; kept after reboot; fix idempotent. |
| Verified | 2026-10-19 by Sn0wAlice on 26.04, Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic, BIOS boot. Fails on a fresh install (enabled=1, apport.service and its socket, path and timer enabled, core_pattern piped to apport); fix masks the units, core_pattern back to core, suid_dumpable to 0; kept after reboot; fix idempotent. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-19, 2026-10-19 |
| Translations | fr |