Postconf segfaults every 5 minutes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix (Debian) |
Fix Released
|
Unknown
|
|||
postfix (Ubuntu) |
Fix Released
|
Low
|
Andreas Hasenack | ||
Bionic |
Fix Released
|
Low
|
Karl Stenerud |
Bug Description
[Impact]
Postfix segfaults when it can't read a map file.
Any users without access to the file will get a core dump when running postfix.
This fix checks that the file was successfully opened before doing any other checks.
[Test Case]
$ lxc launch ubuntu:bionic tester
$ lxc exec tester bash
# apt dist-upgrade
# apt install -y postfix
# touch /etc/postfix/
# chmod 0600 /etc/postfix/
# echo "virtual_alias_maps = pgsql:/
# su - ubuntu
This command, run as user "ubuntu", will segfault:
$ /usr/sbin/postconf virtual_alias_map
[Regression Potential]
The only change is to short-circuit the error checking code early if the file cannot be opened for any reason. This should not cause regressions, as the alternative is to crash when it attempts to read a bad file descriptor.
[Original Description]
Fresh install of 18.04 server. Every 5 minutes postconf segfaults:
Mar 5 14:30:05 hostname-here kernel: [ 672.082204] postconf[12975]: segfault at 40 ip 0000564d613ff053 sp 00007ffc39e19b90 error 4 in postconf[
Mar 5 14:30:06 hostname-here kernel: [ 672.303499] postconf[13004]: segfault at 40 ip 000055b29d0f8053 sp 00007fff72f4b740 error 4 in postconf[
According to Apport log, the crash is caused by following command line:
postconf -h queue_directory
Running the command in shell however works as expected and lists the default spool directory (/var/spool/
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: postfix 3.3.0-1
ProcVersionSign
Uname: Linux 4.15.0-10-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
Date: Mon Mar 5 14:26:27 2018
SourcePackage: postfix
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- Canonical Server Core Reviewers: Pending requested
-
Diff: 57 lines (+35/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/fix-postconf-segfault.diff (+26/-0)
debian/patches/series (+1/-0)
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 56 lines (+34/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/fix-postconf-segfault.diff (+25/-0)
debian/patches/series (+1/-0)
Changed in postfix (Ubuntu): | |
importance: | Medium → Low |
Changed in postfix (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | Triaged → In Progress |
Changed in postfix (Ubuntu Bionic): | |
milestone: | none → bionic-updates |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in postfix (Debian): | |
status: | Unknown → New |
affects: | postfix (Ubuntu) → update (Ubuntu) |
affects: | update (Ubuntu) → postfix (Ubuntu) |
tags: | added: bitesize |
Changed in postfix (Ubuntu Bionic): | |
assignee: | nobody → Karl (kstenerud) |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in postfix (Debian): | |
status: | New → Fix Released |
Thanks for filing this bug in Ubuntu.
Do you know what is making this call every 5min? I couldn't locate a cronjob about it.
You seem to have other services also failing to start:
-- Logs begin at Tue 2018-02-27 14:59:49 EET, end at Mon 2018-03-05 14:25:05 EET. -- livepatch. canonical- livepatchd.
Mar 05 14:19:03 hostname systemd[1]: Failed to start AppArmor initialization.
Mar 05 14:19:04 hostname systemd[1]: Failed to start AppArmor initialization.
Mar 05 14:19:07 hostname iscsid[1778]: iSCSI daemon with pid=1781 started!
Mar 05 14:19:07 hostname systemd[1]: Failed to start LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons).
Mar 05 14:19:12 hostname systemd[1]: Failed to start Service for snap application canonical-
I will need a few more logs to properly diagnose this. Could you please attach the output of:
- dmesg
- cat /var/log/syslog
- free -h
Thanks