Page MenuHomeFreeBSD

Don't indirect user pointers directly in two 802.11s ioctls.
ClosedPublic

Authored by jhb on Apr 24 2020, 8:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 7, 2:55 PM
Unknown Object (File)
Mon, Apr 6, 11:06 PM
Unknown Object (File)
Mon, Mar 30, 12:28 AM
Unknown Object (File)
Sun, Mar 29, 11:46 PM
Unknown Object (File)
Sun, Mar 29, 11:46 PM
Unknown Object (File)
Wed, Mar 25, 4:55 AM
Unknown Object (File)
Thu, Mar 12, 4:01 PM
Unknown Object (File)
Mar 3 2026, 8:20 PM
Subscribers

Details

Summary

IEEE80211_MESH_RTCMD_ADD was invoking memcmp() to validate the
supplied address directly on the user pointer rather than first doing
a copyin() and validating the copied value.

IEEE80211_MESH_RTCMD_DELETE was passing the user pointer directly to
ieee80211_mesh_rt_del() rather than copying the user buffer into a
temporary kernel buffer.

Test Plan
  • found in CheriBSD where user pointers and kernel pointers are different types currently
  • compile tested only, no run-time testing

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 24 2020, 8:41 PM

These should have been reported by SMAP, but apparently nobody uses mesh ?

sys/net80211/ieee80211_mesh.c
3580 ↗(On Diff #70959)

error != 0

In D24562#540481, @kib wrote:

These should have been reported by SMAP, but apparently nobody uses mesh ?

I suspect that no one uses it, yes.

jhb marked an inline comment as done.Apr 24 2020, 10:10 PM