From: Greg KH <gregkh@linuxfoundation.org>
To: "Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at
Cisco)" <asparmar@cisco.com>
Cc: andimiu@pm.me, connman@lists.linux.dev, cve@kernel.org,
deeratho@cisco.com, vchavda@cisco.com
Subject: Re: [PATCH] gdhcp: bound DHCPv6 domain-list parsing
Date: Fri, 4 Dec 2026 19:09:31 +0900 [thread overview]
Message-ID: <2026120410-cyclic-september-e6cb@gregkh> (raw)
In-Reply-To: <20261204064742.3198380-1-asparmar@cisco.com>
On Thu, Dec 03, 2026 at 10:47:42PM -0800, Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco) wrote:
> From: Ashishkumar Parmar <asparmar@cisco.com>
>
> get_domains() copies a fixed NS_MAXDNAME bytes from the DHCPv6
> domain-list option and follows label lengths without checking the
> remaining bytes. A short option can make the copy read beyond its
> input, while a malformed length can move the label walk beyond the
> stack buffer.
>
> Bound the copy by the remaining option length. Check each label length
> and the terminating zero in the original option bytes before adding a
> name. Reading those bytes from the option prevents strncpy() padding
> from masquerading as a wire terminator. Reject label lengths above 63
> and NUL bytes within labels before constructing the returned C string.
> Reject ASCII whitespace in labels because ConnMan writes the returned
> domains into resolv.conf without escaping; a newline could inject a
> second directive. Limit each encoded domain name to 255 bytes,
> including its root label. Return an empty-string entry for a root
> domain, including a root-only list.
>
> Add tests for root domains, malformed labels, NUL and whitespace in
> labels, an injected resolv.conf line, and the 255/256-byte wire-name
> boundary. Cover a nonterminated 1025-byte option that triggers the
> original out-of-bounds walk, and a valid multi-name option longer than
> 255 bytes.
>
> This adapts Andrei Miu's proposed fix:
> <https://lore.kernel.org/connman/179274561161.81299.4579745057858200074@pm.me/>
>
> Fixes: bb06c47101ca24 ("gdhcp: Domain search list DHCPv6 option is checked")
> CVE: CVE-2026-115863
That's not a kernel.org CVE id, so why are you sending this to us?
confused,
greg k-h
prev parent reply other threads:[~2026-12-04 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 8:53 [PATCH] gdhcp: fix stack buffer overflow in get_domains() Andrei Miu
2026-10-23 10:54 ` Greg KH
2026-12-04 6:47 ` [PATCH] gdhcp: bound DHCPv6 domain-list parsing Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-12-04 10:09 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026120410-cyclic-september-e6cb@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andimiu@pm.me \
--cc=asparmar@cisco.com \
--cc=connman@lists.linux.dev \
--cc=cve@kernel.org \
--cc=deeratho@cisco.com \
--cc=vchavda@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox