postmap -u segfaults

Bug #647647 reported by Simon Michael
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postfix (Ubuntu)
Fix Released
Low
LaMont Jones

Bug Description

Binary package hint: postfix

Misunderstanding how to generate a postfix .db file, I ran "postfix -u FILE" where FILE was a valid sasl_passwd file; this gives a segmentation fault. Same thing with an empty FILE.

ubuntu lucid netbook edition
postfix 2.7.0-1
32-bit system 76 netbook

Related branches

Revision history for this message
C de-Avillez (hggdh2) wrote :

Thank you for opening this bug and helping make Ubuntu better. I am assuming you ran postmap, not postfix as in the description.

I can repeat it on Maverick, AMD64; I will collect a backtrace in a few.

Changed in postfix (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Simon Michael (simon) wrote :

That's right, sorry about the typo.

Revision history for this message
C de-Avillez (hggdh2) wrote :

Sigh. Had to build postfix with debug data, it seems standard build does not do it. Anyway, here it is -- I ran it providing a bad parameter to -u:

cerdea@xango2:/build/buildd/postfix$ sudo gdb --args postmap -u NOTHING
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/postmap...done.
(gdb) r
Starting program: /usr/sbin/postmap -u NOTHING
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff797db7a in dict_open3 (dict_type=0x7ffff82022a0 "hash", dict_name=0x0, open_flags=2, dict_flags=1073741888) at dict_open.c:336
336 if (*dict_type == 0 || *dict_name == 0)
(gdb) bt full
#0 0x00007ffff797db7a in dict_open3 (dict_type=0x7ffff82022a0 "hash", dict_name=0x0, open_flags=2, dict_flags=1073741888) at dict_open.c:336
        dp = <value optimized out>
        dict = <value optimized out>
#1 0x00007ffff7ffc783 in postmap_upgrade (map_type=0x7ffff82022a0 "hash", map_name=0x0) at postmap.c:734
        dict = <value optimized out>
#2 0x00007ffff7ffd846 in main (argc=3, argv=0x7fffffffe6f8) at postmap.c:945
        success = 1
        path_name = <value optimized out>
        ch = <value optimized out>
        fd = <value optimized out>
        st = {st_dev = 11, st_ino = 13, st_nlink = 1, st_mode = 8592, st_uid = 1000, st_gid = 5, __pad0 = 0, st_rdev = 34826, st_size = 0, st_blksize = 1024, st_blocks = 0, st_atim = {tv_sec = 1285714177, tv_nsec = 789137862}, st_mtim = {tv_sec = 1285714178, tv_nsec = 299142426}, st_ctim = {tv_sec = 1285684848,
            tv_nsec = 841240489}, __unused = {0, 0, 0}}
        postmap_flags = 3
        open_flags = 578
        dict_flags = <value optimized out>
        upgrade = 1
        query = 0x0
        delkey = <value optimized out>
        sequence = 0
        found = <value optimized out>
(gdb)

Changed in postfix (Ubuntu):
status: Incomplete → Confirmed
LaMont Jones (lamont)
Changed in postfix (Ubuntu):
assignee: nobody → LaMont Jones (lamont)
status: Confirmed → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

postfix (2.8.4-1ubuntu1) oneiric; urgency=low

  * Add back in apport. Debian lacks it, so the package is now
    forked. :(

 -- LaMont Jones <email address hidden> Sat, 20 Aug 2011 14:39:33 -0600

postfix (2.8.4-1) unstable; urgency=low

  [Scott Kitterman]

  * Switch to debhelper 7, use dh_prep instead of dh_clean -k

  [Friedemann Stoyan]

  * create chroots with the right ca_path. Closes: #627266

  [Wietse Venema]

  * Upstream fix release
    - Performance: a high load of DSN success notification requests
      could slow down the queue manager.
    - Bugfix (introduced Postfix 2.3 and Postfix 2.7): the Milter
      client reported some "file too large" errors as temporary
      errors.
    - Bugfix (introduced in Postfix 1.1, duplicated in Postfix
      2.3, unrelated mistake in Postfix 2.7): the local(8) delivery
      agent ignored table lookup errors in mailbox_command_maps,
      mailbox_transport_maps, fallback_transport_maps and (while
      bouncing mail to alias) alias owner lookup.
    - Bugfix (introduced Postfix 2.6 with master_service_disable)
      loop control error when parsing a malformed master.cf file.
    - Bugfix (introduced: Postfix 2.7): "sendmail -t" reported
      "protocol error" after queue file write error.
    - Linux kernel version 3 support.
    - Workaround: some Spamhaus RHSBL rejects lookups with "No
      IP queries" even if the name has an alphanumerical prefix.
      We play safe, and skip both RHSBL and RHSWL queries for
      names ending in a numerical suffix.

  [LaMont Jones]

  * apport, fix FTBFS on linux 3.0 - From ubuntu.
  * SASL vs multiarch. Closes: #638443, #638045
  * Update init.d script to handle multi_instance setups. Closes: #560682
  * Do not try to update resolv.conf when main.cf does not exist. LP: #530323
  * Better handle bad map names in postmap -u. LP: #647647
  * Drop apport usage, since debian lacks it and failing to build is bad.

 -- LaMont Jones <email address hidden> Sat, 20 Aug 2011 13:48:59 -0600

Changed in postfix (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.