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

FreeBSD -- Uninitialized kernel memory disclosure via ktrace(2)

Affected packages
14.2 <= FreeBSD-kernel < 14.2_1

Details

VuXML ID 2830b374-debd-11ef-87ba-002590c1f29c
Discovery 2025-01-29
Entry 2025-01-30

Problem Description:

In some cases, the ktrace facility will log the contents of kernel structures to userspace. In one such case, ktrace dumps a variable-sized sockaddr to userspace. There, the full sockaddr is copied, even when it is shorter than the full size. This can result in up to 14 uninitialized bytes of kernel memory being copied out to userspace.

Impact:

It is possible for an unprivileged userspace program to leak 14 bytes of a kernel heap allocation to userspace.

References

CVE Name CVE-2025-0662
FreeBSD Advisory SA-25:04.ktrace