** Description changed:

+ [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[564d613e7000+25000]
- Mar  5 14:30:06 hostname-here kernel: [  672.303499] postconf[13004]: 
segfault at 40 ip 000055b29d0f8053 sp 00007fff72f4b740 error 4 in 
postconf[55b29d0e0000+25000]
+ Mar 5 14:30:05 hostname-here kernel: [ 672.082204] postconf[12975]: segfault 
at 40 ip 0000564d613ff053 sp 00007ffc39e19b90 error 4 in 
postconf[564d613e7000+25000]
+ Mar 5 14:30:06 hostname-here kernel: [ 672.303499] postconf[13004]: segfault 
at 40 ip 000055b29d0f8053 sp 00007fff72f4b740 error 4 in 
postconf[55b29d0e0000+25000]
  
  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/postfix).
  
  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: postfix 3.3.0-1
  ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
  Uname: Linux 4.15.0-10-generic x86_64
  ApportVersion: 2.20.8-0ubuntu10
  Architecture: amd64
- Date: Mon Mar  5 14:26:27 2018
+ Date: Mon Mar 5 14:26:27 2018
  SourcePackage: postfix
  UpgradeStatus: No upgrade log present (probably fresh install)
+ 
+ 
+ [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 builder
+ lxc exec builder bash
+ 
+ apt dist-upgrade
+ apt install -y postfix
+ 
+ echo "query = SELECT real_address from tempmail where time_expires>now() and 
temp_address='%s';
+ user = username-here
+ password = password-here
+ dbname = postfix
+ hosts = ip-here" >/etc/postfix/valiases.cf
+ chmod 0600 /etc/postfix/valiases.cf
+ echo "virtual_alias_maps = pgsql:/etc/postfix/valiases.cf" >> 
/etc/postfix/main.cf
+ useradd test
+ su - test
+ /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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1753470

Title:
  Postconf segfaults every 5 minutes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1753470/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to