惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
C
Check Point Blog
B
Blog RSS Feed
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
小众软件
小众软件
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
GbyAI
GbyAI
The Cloudflare Blog
博客园 - 叶小钗
S
SegmentFault 最新的问题
博客园 - Franky
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
B
Blog
Jina AI
Jina AI

dnsmasq-discuss

[Dnsmasq-discuss] Announce: dnsmasq-2.92rc2 Re: [Dnsmasq-discuss] [PATCH] Fix arguments order for chaos subdomain check Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] server= with interface parameter changes behavior over time [Dnsmasq-discuss] NFTsets and hosts-files [Dnsmasq-discuss] [PATCH] Allow expired RRSIGs when stale caching is enabled [Dnsmasq-discuss] [PATCH] Fix local host records being overridden by upstream NXDOMAIN [Dnsmasq-discuss] [PATCH] Fix arguments order for chaos subdomain check Re: [Dnsmasq-discuss] Malformed RRSIG Can Crash dnsmasq [Dnsmasq-discuss] Malformed NSEC/NSEC3 Can Hang dnsmasq [Dnsmasq-discuss] Malformed RRSIG Can Crash dnsmasq [Dnsmasq-discuss] Security - IMPORTANT Re: [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests Re: [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests Re: [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] dnssec problem here and now Re: [Dnsmasq-discuss] dnssec problem here and now [Dnsmasq-discuss] dnssec problem here and now Re: [Dnsmasq-discuss] server= with interface parameter changes behavior over time Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] [PATCH] Preserve existing log file permissions when adding group-write bit. [Dnsmasq-discuss] server= with interface parameter changes behavior over time
Re: [Dnsmasq-discuss] Potential memory leak
Simon Kelley · 2026-02-02 · via dnsmasq-discuss

On 31.01.2026 22:42, Matthias Andree wrote:

I've built dnsmasq v2.93test2 on Fedora Linux 43 (amd64 aka x86_64) with address and undefined behavior sanitizers in GCC and with HAVE_DNSSEC, and I am providing three patches (should suit git-am) to fix

* one access past the end of the iovec (reading past the iovcnt limit) that triggers AddressSanitizer reproducibly, in read_writev()

* one "variable may be used uninitialized" (I didn't check the logic, I just bluntly added = NULL to shut up the compiler) in dnssec code

* one patch that fixes undefined behavior, where base32_decode may shift into the sign bit which might wreak havoc on perverse C implementations (compiler & processor combination); I didn't test if as alternative, making the "oc" an unsigned integer could help, because for unsigned integers, wrapping is well-defined, but not for signed integers. We can clear the "oc" when we've written it.

I haven't seen a memory leak reported by address sanitizer yet, also valgrind in leak-checking mode on FreeBSD didn't holler.

To reproduce, add #define HAVE_DNSSEC to src/config.h, and change these three lines in Makefile - this assumes your debugger understands DWARF4 format and the compiler is reasonably compatible to GCC. You may need to tweak ASAN_OPTIONS=detect_leaks=1 to enable leak checking. Note the leak checker availability across operating systems is pretty limited. Systems that don't have it want to forgo that and use a different leak checker (valgrind might work).

CFLAGS        = -Wall -W -Og -ggdb3 -gdwarf-4 -fno-omit-frame-pointer
LDFLAGS       = -fsanitize=address,undefined
COPTS         = -fsanitize=address,undefined


Patches applied. Those build flags work well on Ubuntu 24.04 LTS, and have been noted for future use. Thanks.

I'm working on the assumption that there's something unusual in the Opensense configuration. Just don't know what it is.

Simon.



_______________________________________________
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss