Page MenuHomeFreeBSD

jail: guard the IP address pointer in kern_jail_get()
Needs ReviewPublic

Authored by nick_spun.io on Sat, Oct 10, 3:08 AM.
Referenced Files
F175359987: D60575.id189332.diff
Sat, Oct 10, 6:57 AM
F175357689: D60575.diff
Sat, Oct 10, 6:34 AM
F175354694: D60575.id189332.diff
Sat, Oct 10, 6:01 AM
F175354566: D60575.id.diff
Sat, Oct 10, 5:59 AM
F175354320: D60575.diff
Sat, Oct 10, 5:56 AM
Subscribers

Details

Reviewers
adrian
Summary

For a prison with no address of a family, kern_jail_get() evaluated
pr->pr_addrs[af]->pr_ip, a member access on a NULL prison_ip, for
vfs_setopt_part()'s value argument. The length is 0 in that case and
the value then goes unused, so it is harmless, but KUBSAN flags the
undefined access.

Guard the pointer like the length already is.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77949
Build 74832: arc lint + arc unit