systemd-resolved segfault in hashmap_iterate_entry

Bug #1949723 reported by frigo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
In Progress
Medium
Matthew Ruffell

Bug Description

installed libnss-resolve that put "resolve" in nsswitch.conf.

$ lsb_release -rd
Description: Ubuntu 20.04.3 LTS
Release: 20.04
$ dpkg -l systemd | grep systemd
ii systemd 245.4-4ubuntu3.13 amd64 system and service manager
$ grep ^hosts /etc/nsswitch.conf
hosts: files libvirt mdns4_minimal resolve [NOTFOUND=return] dns mymachines

systemd-resolved crashed once with segmentation fault.

(gdb) bt
#0 0x00007f119c67693a in hashmap_iterate_entry (h=h@entry=0x706f746b73656465, i=i@entry=0x7ffc4ef515d0) at ../src/basic/hashmap.c:705
#1 0x00007f119c6789d6 in internal_hashmap_iterate (h=0x706f746b73656465, i=i@entry=0x7ffc4ef515d0, value=value@entry=0x7ffc4ef515c8, key=key@entry=0x0)
    at ../src/basic/hashmap.c:714
#2 0x00007f119c678a8b in set_iterate (s=<optimised out>, i=i@entry=0x7ffc4ef515d0, value=value@entry=0x7ffc4ef515c8) at ../src/basic/hashmap.c:735
#3 0x000055ba5e0ea917 in dns_query_candidate_go (c=c@entry=0x55ba5f353180) at ../src/resolve/resolved-dns-query.c:152
#4 0x000055ba5e0e9f0c in dns_query_candidate_notify (c=c@entry=0x55ba5f353180) at ../src/resolve/resolved-dns-query.c:312
#5 0x000055ba5e0ea178 in dns_transaction_complete (t=0x55ba5f37a9d0, state=<optimised out>) at ../src/resolve/resolved-dns-transaction.c:351
#6 0x000055ba5e0e27cd in dns_transaction_process_dnssec (t=t@entry=0x55ba5f37a9d0) at ../src/resolve/resolved-dns-transaction.c:838
#7 0x000055ba5e0e3649 in dns_transaction_process_reply (t=t@entry=0x55ba5f37a9d0, p=p@entry=0x55ba5f39dce0)
    at ../src/resolve/resolved-dns-transaction.c:1210
#8 0x000055ba5e0e40ab in on_dns_packet (s=<optimised out>, fd=<optimised out>, revents=<optimised out>, userdata=0x55ba5f37a9d0)
    at ../src/resolve/resolved-dns-transaction.c:1264
#9 0x00007f119c5e6c77 in source_dispatch (s=s@entry=0x55ba5f346780) at ../src/libsystemd/sd-event/sd-event.c:3193
#10 0x00007f119c5e6f11 in sd_event_dispatch (e=e@entry=0x55ba5f320430) at ../src/libsystemd/sd-event/sd-event.c:3634
#11 0x00007f119c5e8948 in sd_event_run (e=e@entry=0x55ba5f320430, timeout=timeout@entry=18446744073709551615) at ../src/libsystemd/sd-event/sd-event.c:3692
#12 0x00007f119c5e8b6f in sd_event_loop (e=0x55ba5f320430) at ../src/libsystemd/sd-event/sd-event.c:3714
#13 0x000055ba5e0c326a in run (argv=<optimised out>, argc=<optimised out>) at ../src/resolve/resolved.c:84
#14 main (argc=<optimised out>, argv=<optimised out>) at ../src/resolve/resolved.c:91

This seems to have been reported upstream
https://github.com/systemd/systemd/issues/16168

Tags: sts
Revision history for this message
Nick Rosbrook (enr0n) wrote :

The mentioned fix in the upstream report has been in systemd since 2021.

Changed in systemd (Ubuntu):
status: New → Fix Released
Changed in systemd (Ubuntu Focal):
importance: Undecided → Low
Changed in systemd (Ubuntu Focal):
status: New → In Progress
importance: Low → Medium
assignee: nobody → Matthew Ruffell (mruffell)
tags: added: sts
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.