FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

FreeBSD -- ICMPv6 use-after-free in error message handling

Affected packages
12.2 <= FreeBSD-kernel < 12.2_1
12.1 <= FreeBSD-kernel < 12.1_11
11.4 <= FreeBSD-kernel < 11.4_5

Details

VuXML ID 8eed0c5c-3482-11eb-b87a-901b0ef719ab
Discovery 2020-12-01
Entry 2020-12-02

Problem Description:

When an ICMPv6 error message is received, the FreeBSD ICMPv6 stack may extract information from the message to hand to upper-layer protocols. As a part of this operation, it may parse IPv6 header options from a packet embedded in the ICMPv6 message.

The handler for a routing option caches a pointer into the packet buffer holding the ICMPv6 message. However, when processing subsequent options the packet buffer may be freed, rendering the cached pointer invalid. The network stack may later dereference the pointer, potentially triggering a use-after-free.

Impact:

A remote host may be able to trigger a read of freed kernel memory. This may trigger a kernel panic if the address had been unmapped.

References

CVE Name CVE-2020-7469
FreeBSD Advisory SA-20:31.icmp6