Safeguard
Vulnerability Analysis•

CVE-2022-23084: High TOCTOU Flaw in FreeBSD netmap (Jail Escape)

CVE-2022-23084 is a time-of-check to time-of-use bug in FreeBSD netmap. Only systems with netmap in devfs_ruleset are affected. Update FreeBSD and reboot.

Safeguard Security Team
3 min read

CVE-2022-23084 is a high severity race in FreeBSD's netmap code, scored 7.5. A privileged process in a jail could corrupt kernel memory and affect the host. Only systems that include netmap in their devfs_ruleset are affected. FreeBSD fixed it in April 2022, so update to a patched release and reboot.

What's affected

FreeBSD's advisory SA-22:04 says all supported versions at the time were affected. That covered 13.0, 13.1 (then at release candidate) and 12.3. The advisory covers this CVE and CVE-2022-23085 together.

Corrections landed on these dates: stable/13 on 2022-03-19, stable/12 on 2022-03-20, and the release branches on 2022-04-06. The fixed release levels are 13.1-RC1-p1, 13.0-RELEASE-p11 and 12.3-RELEASE-p5. A system built from a branch dated after the correction date is also fixed.

The key condition is configuration. The advisory states that systems that do not include netmap in their devfs_ruleset are unaffected, and that a default FreeBSD installation does not include it. So exposure is mostly limited to hosts that deliberately expose netmap to jails.

NVD gives a CVSS 3.1 base score of 7.5 with a changed scope, because a jail process can reach the host. The advisory itself does not assign a severity score. The NVD record lists FreeBSD 12.3 and 12.3-p1 among the affected products. The NetApp bulletin linked from the record also exists for appliances that embed FreeBSD, so check your vendor if you run one.

Weakness class per the record: CWE-367.

How to check if you're exposed

Check the patch level first:

freebsd-version -ku
uname -a

The first command prints the installed kernel and the running userland patch level. Compare against 13.0-RELEASE-p11, 13.1-RC1-p1 or 12.3-RELEASE-p5, or later on the same branch.

Then check whether netmap is exposed to jails. Look through your devfs rulesets for a netmap entry:

devfs rule show
grep -r netmap /etc/devfs.rules /etc/jail.conf /etc/jail.conf.d 2>/dev/null

If no ruleset includes netmap, the advisory says the system is unaffected, though updating is still the right move.

What to do now

  1. List FreeBSD hosts that run jails, and note which ones use a custom devfs ruleset.
  2. Run freebsd-version -ku on each and compare it with the fixed levels in the advisory.
  3. Update with freebsd-update fetch then freebsd-update install on supported platforms, or apply the source patch from the advisory, and then reboot.
  4. Remove netmap from jail devfs rulesets that do not need it. FreeBSD lists no workaround other than not exposing netmap.

Why it matters

This is a time-of-check to time-of-use flaw, CWE-367. The netmap code computed the total size of a user supplied request structure, then trusted that size later while copying it into the kernel. If the data changes between those two steps, the copy can overrun a kernel buffer.

Kernel memory corruption matters most where isolation is the point. Jails exist to keep a process away from the host. If a privileged process inside a jail can corrupt kernel memory, the boundary is no longer reliable. That is why the scope in the score is marked as changed.

The practical risk depends on configuration, which is why the advisory's note about the default ruleset is useful. Most FreeBSD hosts will not have this exposed, but hosts that deliberately expose netmap to jails might.

Quick check

Is a default FreeBSD install affected?

The advisory says a default installation does not include netmap in its devfs_ruleset, and systems without it are unaffected. Check any custom jail rulesets.

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.