In FreeBSD 12.1-STABLE before r363918, 12.1-RELEASE before p8, 11.4-STABLE before r363919, 11.4-RELEASE before p2, and 11.3-RELEASE before p12, the sendmsg system call in the compat32 subsystem on 64-bit platforms has a time-of-check to time-of-use vulnerability allowing a mailcious userspace program to modify control message headers after they were validation.
Recent assessments:
wvu-r7 at September 02, 2020 7:47pm UTC reported:
Seems to be a reliable though somewhat elaborate LPE on all 64-bit FreeBSD kernels since 2014.
Though FBSD may not be as common as (GNU/)Linux, Iβve seen it used as an appliance base by certain vendors. The OS doesnβt always get patched in those cases.
ETA: Looks like it has the potential to crash even exploitable systems, but it is a kernel heap memory corruption.
$ ./exploit
[+] Starting wrecker
[+] Wrecker ready
[+] Starting executor
[+] Waiting...
[+] Winner 1
[+] Winner 2
[+] Magic found
# id
uid=0(root) gid=0(wheel) egid=1001(user) groups=1001(user)
# uname -a
FreeBSD 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC amd64
#
Otherwise working.
Assessed Attacker Value: 4
Assessed Attacker Value: 4Assessed Attacker Value: 3