]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolve: mdns: calculate required packet size to store questions and authorities 23875/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 4 Jul 2022 09:09:58 +0000 (18:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Jul 2022 20:20:10 +0000 (05:20 +0900)
commit325513bc776c739a814996cc5c483235ca92be86
tree197914963a0fd97d99ed99314fc615c0a482beeb
parent055acd4d8b385fd9ff29e49e0c46856a9e705433
resolve: mdns: calculate required packet size to store questions and authorities

Otherwise, if we have many cached entries or pending transactions with
TYPE_ANY, then dns_transaction_make_packet_mdns() fails with -EMSGSIZE.

This also fixes use-after-free.

Fixes #23894.
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-cache.h
src/resolve/resolved-dns-transaction.c