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

推荐订阅源

WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
Vercel News
Vercel News
Last Week in AI
Last Week in AI
H
Help Net Security
The Cloudflare Blog
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
I
InfoQ
U
Unit 42
美团技术团队
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
A
About on SuperTechFans
宝玉的分享
宝玉的分享
量子位
博客园_首页

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] segfault with an empty OPTION_SNAME
Jeff Allen via Dnsmasq-discuss · 2026-02-24 · via dnsmasq-discuss
Hello, quick followup.

I realized that 2.90 is quite old, and I felt guilty that I might have
reported a bug that was fixed a while ago.

The problem still exists in master. parse_dhcp_opt() still uses
opt_string_alloc() for strings; opt_string_alloc() returns NULL for empty
strings. So `dhcp-option=tag:!ARISTA,66,` still yields `opt->val == NULL`.

Hope this is helpful.

 -jeff

PS: I don't know how people feel about AI coding, but the analysis above is
from GPT 5.2 Codex, as driven by the exe.the dev agent harness, which I
then checked personally. I gave it the repo URL, and my original bug
report, and I asked if the bug was fixed in master.


On Tue, Feb 24, 2026 at 2:30 PM Jeff Allen <[email protected]> wrote:

> Hello,
>
> Today I debugged an unexpected new segfault in dnsmasq that appeared on a
> pre-production system. I found the culprit: a malformed "dhcp-option" line.
> It was malformed because of a difference between the systems that generate
> configs in preprod and prod.
>
> But that's my bug, and I'll fix it myself. However, I thought you'd like
> to know about the possibility of getting segfaults in dnsmasq anyway.
>
> It comes, in dnsmasq 2.90, from rfc2131.c line 2493:
>
> 2490      if ((!req_options || !in_list(req_options, OPTION_SNAME)) &&
> 2491  (opt = option_find2(OPTION_SNAME)) && !(opt->flags & DHOPT_FORCE))
> 2492 {
> 2493  safe_strncpy((char *)mess->sname, (char *)opt->val,
> sizeof(mess->sname));
> 2494  done_server = 1;
> 2495 }
>
> If opt->val is NULL, then safe_strcpy will cause a segfault.
>
> Opt-val was NULL in my case because of this line in my config file:
>
>     dhcp-option=tag:!ARISTA,66,
>
> The tag ARISTA was not set, so this option was used. If there's
> something after the comma, the crash goes away.
>
> Have a nice day,
>   -jeff
>
>
_______________________________________________
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss