Skip to content

net/lib/dns doesn't respect CONFIG_NET_IPV6=n #1487

@pfalcon

Description

@pfalcon

net/lib/dns still can be made to resolve IPv6 addresses, even if support for them is disabled. This only leads to buffer overflows, as the resolver tries to stuff IPv6 address in a struct sockaddr which is laid out to hold only IPv4 address.

Sample debug output:

here, sizeof=8
fam here: 10
fam here1: 10
fam here1.1: 10
fam here1.2: 10, addr_size=16
fam here2: 0
dns status: -100
fam: 0
dns status: -103
st: 0

(here, dns_addrinfo::ai_family was overwritten)

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions