Mailing List Archive

[Bug 2648] Use of $authres in a router headers_add causes segmentation violation for local messages
https://bugs.exim.org/show_bug.cgi?id=2648

Jeremy Harris <jgh146exb@wizmail.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unallocated@exim.org |jgh146exb@wizmail.org

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2648] Use of $authres in a router headers_add causes segmentation violation for local messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2648

--- Comment #1 from Jeremy Harris <jgh146exb@wizmail.org> ---
Cannot duplicate in test, even going back to 4.92 :-

19:03:00 34305 routing fred@test.ex
19:03:00 34305 --------> r1 router <--------
19:03:00 34305 local_part=fred domain=test.ex
19:03:00 34305 calling r1 router
19:03:00 34305 r1 router called for fred@test.ex
19:03:00 34305 domain = test.ex
19:03:00 34305 ?considering: ${authresults {$primary_hostname}}
19:03:00 34305 ?considering: $primary_hostname}}
19:03:00 34305 ???expanding: $primary_hostname
19:03:00 34305 ??????result: myhost.test.ex
19:03:00 34305 DKIM: no authres
19:03:00 34305 ARC: no authres
19:03:00 34305 ???expanding: ${authresults {$primary_hostname}}
19:03:00 34305 ??????result: Authentication-Results: myhost.test.ex
19:03:00 34305 set transport t1
19:03:00 34305 queued for t1 transport: local_part = fred
19:03:00 34305 domain = test.ex
19:03:00 34305 errors_to=NULL
19:03:00 34305 domain_data=NULL localpart_data=NULL
19:03:00 34305 routed by r1 router
19:03:00 34305 envelope to: fred@test.ex
19:03:00 34305 transport: t1

Can you get a debug run?

--
You are receiving this mail because:
You are on the CC list for the bug.
[Bug 2648] Use of $authres in a router headers_add causes segmentation violation for local messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2648

--- Comment #2 from Jim Fenton <fenton@bluepopcorn.net> ---
Created attachment 1337
--> https://bugs.exim.org/attachment.cgi?id=1337&action=edit
Config

Here's the configuration file (Debian-style config) in case you want that too.
It's very close to their stock config file.

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2648] Use of $authres in a router headers_add causes segmentation violation for local messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2648

--- Comment #3 from Jim Fenton <fenton@bluepopcorn.net> ---
Sure. I submitted a message to and from myself from my mail client. When I did,
it queued the message. Not sure why; maybe that's related to the problem. Then
did a runq -d:

root@altmode:/etc/exim4# runq -d
Exim version 4.92 uid=0 gid=0 pid=8601 D=f7715cfd
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc GnuTLS
move_frozen_messages Content_Scanning DANE DKIM DNSSEC Event OCSP PRDR PROXY
SOCKS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz
dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa tls
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Compiler: GCC [8.3.0]
Library version: Glibc: Compile: 2.28
Runtime: 2.28
Library version: BDB: Compile: Berkeley DB 5.3.28: (September 9, 2013)
Runtime: Berkeley DB 5.3.28: (September 9, 2013)
Library version: GnuTLS: Compile: 3.6.7
Runtime: 3.6.7
Library version: Cyrus SASL: Compile: 2.1.27
Runtime: 2.1.27 [Cyrus SASL]
Library version: PCRE: Compile: 8.39
Runtime: 8.39 2016-06-14
Total 19 lookups
Library version: MySQL: Compile: 100322 10.3.22 [mariadb-10.3]
Runtime: 100323 10.3.23
Library version: SQLite: Compile: 3.27.2
Runtime: 3.27.2
WHITELIST_D_MACROS: "OUTGOING"
TRUSTED_CONFIG_LIST: "/etc/exim4/trusted_configs"
changed uid/gid: forcing real = effective
uid=0 gid=0 pid=8601
auxiliary group list: <none>
seeking password data for user "uucp": cache not available
getpwnam() succeeded uid=10 gid=10
changed uid/gid: calling tls_validate_require_cipher
uid=104 gid=109 pid=8602
auxiliary group list: <none>
tls_validate_require_cipher child 8602 ended: status=0x0
configuration file is /var/lib/exim4/config.autogenerated
log selectors = 0000cffc c6401022 00000001
cwd=/etc/exim4 2 args: runq -d
trusted user
admin user
seeking password data for user "mail": cache not available
getpwnam() succeeded uid=8 gid=8
Single queue run
set_process_info: 8601 running the queue (single queue run)
LOG: queue_run MAIN
Start queue run: pid=8601
queue running main directory
looking in /var/spool/exim4//input
search_tidyup called
set_process_info: 8601 running queue: 1kLYtY-0002Di-Cm-H
set_process_info: 8601 running queue: waiting for 1kLYtY-0002Di-Cm (8603)
set_process_info: 8603 delivering 1kLYtY-0002Di-Cm (queue run pid 8601)
Trying spool file /var/spool/exim4//input//1kLYtY-0002Di-Cm-D
reading spool file 1kLYtY-0002Di-Cm-H
user=Debian-exim uid=104 gid=109 sender=fenton@altmode.net
sender_fullhost = ([10.10.20.144]) [2601:647:4400:1261:a494:fff:f3b1:e1f7]
sender_rcvhost = [2601:647:4400:1261:a494:fff:f3b1:e1f7] (helo=[10.10.20.144])
sender_local=0 ident=unset
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
body_linecount=1 message_linecount=14
DSN: set orcpt: flags: 0
Delivery address list:
fenton@altmode.net
locking /var/spool/exim4/db/retry.lockfile
locked /var/spool/exim4/db/retry.lockfile
EXIM_DBOPEN: file </var/spool/exim4/db/retry> dir </var/spool/exim4/db>
flags=O_RDONLY
returned from EXIM_DBOPEN: 0x55bb029d1980
opened hints database /var/spool/exim4/db/retry: flags=O_RDONLY
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering: fenton@altmode.net
unique = fenton@altmode.net
dbfn_read: key=R:altmode.net
dbfn_read: key=R:fenton@altmode.net
dbfn_read: key=R:fenton@altmode.net:<fenton@altmode.net>
no domain retry record
no address retry record
fenton@altmode.net: queued for routing
EXIM_DBCLOSE(0x55bb029d1980)
closed hints database and lockfile
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing fenton@altmode.net
--------> hubbed_hosts router <--------
local_part=fenton domain=altmode.net
checking domains
expansion of "${if
exists{/etc/exim4/hubbed_hosts}{partial-lsearch;/etc/exim4/hubbed_hosts}fail}"
forced failure: assume not in this list
hubbed_hosts router skipped: domains mismatch
--------> dnslookup_relay_to_domains router <--------
local_part=fenton domain=altmode.net
checking domains
altmode.net in "@:localhost"? yes (matched "@")
altmode.net in "! +local_domains : +relay_to_domains"? no (matched "!
+local_domains")
dnslookup_relay_to_domains router skipped: domains mismatch
--------> dnslookup router <--------
local_part=fenton domain=altmode.net
checking domains
cached yes match for +local_domains
cached lookup data = NULL
altmode.net in "! +local_domains"? no (matched "! +local_domains" - cached)
dnslookup router skipped: domains mismatch
--------> real_local router <--------
local_part=fenton domain=altmode.net
real_local router skipped: prefix mismatch
--------> system_aliases router <--------
local_part=fenton domain=altmode.net
checking domains
cached yes match for +local_domains
cached lookup data = NULL
altmode.net in "+local_domains"? yes (matched "+local_domains" - cached)
R: system_aliases for fenton@altmode.net
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="fenton" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="fenton"
file lookup required for fenton
in /etc/aliases
lookup failed
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for fenton@altmode.net
--------> userforward router <--------
local_part=fenton domain=altmode.net
checking domains
cached yes match for +local_domains
cached lookup data = NULL
altmode.net in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "fenton": cache not available
getpwnam() succeeded uid=1000 gid=1000
R: userforward for fenton@altmode.net
checking require_files
seeking password data for user "fenton": using cached result
getpwnam() succeeded uid=1000 gid=1000
check subsequent files for access by fenton
file check: $home/.forward
expanded file: /home/fenton/.forward
stat() yielded -1
errno = 2
userforward router skipped: file check
--------> procmail router <--------
local_part=fenton domain=altmode.net
checking domains
cached yes match for +local_domains
cached lookup data = NULL
altmode.net in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "fenton": using cached result
getpwnam() succeeded uid=1000 gid=1000
R: procmail for fenton@altmode.net
checking require_files
seeking password data for user "fenton": using cached result
getpwnam() succeeded uid=1000 gid=1000
check subsequent files for access by fenton
file check: ${if exists{/etc/procmailrc}{/etc/procmailrc}{${home}/.procmailrc}}
expanded file: /home/fenton/.procmailrc
stat() yielded 0
route_check_access(/home/fenton/.procmailrc,1000,1000,4)
stat /home
stat /home/fenton
stat /home/fenton/.procmailrc
route_check_access() succeeded
file check: +/usr/bin/procmail
expanded file: /usr/bin/procmail
stat() yielded 0
route_check_access(/usr/bin/procmail,1000,1000,4)
stat /usr
stat /usr/bin
stat /usr/bin/procmail
route_check_access() succeeded
calling procmail router
procmail router called for fenton@altmode.net
domain = altmode.net
LOG: MAIN PANIC
queue run: process 8603 crashed with signal 11 while delivering
1kLYtY-0002Di-Cm
set_process_info: 8601 running queue: waiting for children of 8603
set_process_info: 8601 running queue
LOG: queue_run MAIN
End queue run: pid=8601
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=8601 (main) terminating with rc=0 >>>>>>>>>>>>>>>>
root@altmode:/etc/exim4#

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2648] Use of $authres in a router headers_add causes segmentation violation for local messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2648

--- Comment #4 from Jeremy Harris <jgh146exb@wizmail.org> ---
Bother. "-d" doesn't include expansions. Again, using "-d+expand" please?
And just the tail end, from where the "procmail" router starts running?

--
You are receiving this mail because:
You are on the CC list for the bug.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 2648] Use of $authres in a router headers_add causes segmentation violation for local messages [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=2648

--- Comment #5 from Jim Fenton <fenton@bluepopcorn.net> ---
Here you go:

--------> procmail router <--------
local_part=fenton domain=altmode.net
checking domains
cached yes match for +local_domains
cached lookup data = NULL
altmode.net in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "fenton": using cached result
getpwnam() succeeded uid=1000 gid=1000
?considering: R: procmail for $local_part@$domain
???expanding: R: procmail for $local_part@$domain
??????result: R: procmail for fenton@altmode.net
R: procmail for fenton@altmode.net
checking require_files
?considering: ${local_part}
???expanding: ${local_part}
??????result: fenton
seeking password data for user "fenton": using cached result
getpwnam() succeeded uid=1000 gid=1000
check subsequent files for access by fenton
?considering: ${if
exists{/etc/procmailrc}{/etc/procmailrc}{${home}/.procmailrc}}
?considering: /etc/procmailrc}{/etc/procmailrc}{${home}/.procmailrc}}
???expanding: /etc/procmailrc
??????result: /etc/procmailrc
???condition: exists{/etc/procmailrc}
??????result: false
????scanning: /etc/procmailrc}{${home}/.procmailrc}}
???expanding: /etc/procmailrc
??????result: /etc/procmailrc
????skipping: result is not used
?considering: ${home}/.procmailrc}}
???expanding: ${home}/.procmailrc
??????result: /home/fenton/.procmailrc
???expanding: ${if
exists{/etc/procmailrc}{/etc/procmailrc}{${home}/.procmailrc}}
??????result: /home/fenton/.procmailrc
file check: ${if exists{/etc/procmailrc}{/etc/procmailrc}{${home}/.procmailrc}}
expanded file: /home/fenton/.procmailrc
stat() yielded 0
route_check_access(/home/fenton/.procmailrc,1000,1000,4)
stat /home
stat /home/fenton
stat /home/fenton/.procmailrc
route_check_access() succeeded
file check: +/usr/bin/procmail
expanded file: /usr/bin/procmail
stat() yielded 0
route_check_access(/usr/bin/procmail,1000,1000,4)
stat /usr
stat /usr/bin
stat /usr/bin/procmail
route_check_access() succeeded
calling procmail router
procmail router called for fenton@altmode.net
domain = altmode.net
?considering: ${authresults {$primary_hostname}}
?considering: $primary_hostname}}
???expanding: $primary_hostname
??????result: altmode.net
LOG: MAIN PANIC
queue run: process 9163 crashed with signal 11 while delivering
1kLYtY-0002Di-Cm
set_process_info: 9161 running queue: waiting for children of 9163
set_process_info: 9161 running queue
LOG: queue_run MAIN
End queue run: pid=9161
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=9161 (main) terminating with rc=0 >>>>>>>>>>>>>>>>

--
You are receiving this mail because:
You are on the CC list for the bug.