Safeguard
Vulnerability Analysis•

CVE-2022-23086: High Heap Overflow in FreeBSD mpr, mps, mpt

CVE-2022-23086 is a heap overflow in FreeBSD mpr, mps and mpt disk drivers, scored 7.8. Only root and operator can reach it. Update FreeBSD and reboot.

Safeguard Security Team
3 min read

CVE-2022-23086 is a high severity heap overflow in the FreeBSD mpr, mps and mpt disk controller drivers, scored 7.8. Users with access to the device node could overwrite heap data and possibly gain more privileges. The node is limited to root and the operator group. Update FreeBSD and reboot.

What's affected

FreeBSD advisory SA-22:06 lists all supported versions at the time as affected, which meant 13.0, 13.1 at release candidate stage, and 12.3. Systems that do not use the mpr(4), mps(4) or mpt(4) drivers are not affected.

Corrections were committed on 2022-04-04 for stable/13, stable/12 and releng/13.1, and on 2022-04-06 for releng/13.0 and releng/12.3. Fixed release levels are 13.1-RC1-p1, 13.0-RELEASE-p11 and 12.3-RELEASE-p5. No workaround is available.

The advisory describes the drivers as disk controller drivers and the interface as an ioctl used by command line utilities to query or set properties on the device.

NVD scores the flaw 7.8 with local attack vector and low privileges required. The advisory does not give its own score. Note that the device node is only accessible to root and members of the operator group, so the group list matters.

Weakness class per the record: CWE-787, CWE-122.

How to check if you're exposed

First, find out whether the drivers are in use:

kldstat | grep -E 'mpr|mps|mpt'
pciconf -lv | grep -iE 'mpr|mps|mpt'
dmesg | grep -E '^(mpr|mps|mpt)[0-9]'

If the driver is compiled into the kernel, kldstat will not list it, so also check dmesg. If nothing appears, the advisory says the system is not affected.

Then check the patch level with freebsd-version -ku and compare with 13.0-RELEASE-p11, 13.1-RC1-p1 or 12.3-RELEASE-p5, or later.

Finally, list the members of the operator group, since they can open the device node:

getent group operator

What to do now

  1. Find hosts using mpr, mps or mpt adapters.
  2. Update with freebsd-update or the signed patch from the advisory, then reboot so the kernel is replaced.
  3. Review the operator group and remove accounts that do not need disk controller access.
  4. Confirm the new patch level with freebsd-version -ku.

Why it matters

The handlers for the configuration page read and write requests allocated a buffer of the size the caller asked for, but always copied in a fixed size header. If the caller chose a size smaller than the header, the copy wrote past the end of the allocation and overwrote neighboring heap data. This is a heap based buffer overflow, and the record maps it to CWE-787 and CWE-122.

The attacker needs access to the device node, which limits who can try it. Still, heap corruption in the kernel is a path to privilege escalation, and operator group membership is sometimes granted for convenience on storage hosts.

The lesson for any driver is to validate caller supplied sizes before any copy, rather than trusting that the caller's size is large enough.

Quick check

Who can reach the vulnerable interface?

The advisory says the device node is only accessible to root and members of the operator group.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.