]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pf: Set the pfik_group for userspace
authorKristof Provost <kp@FreeBSD.org>
Sun, 16 May 2021 06:50:17 +0000 (08:50 +0200)
committerKristof Provost <kp@FreeBSD.org>
Mon, 24 May 2021 15:38:22 +0000 (17:38 +0200)
commit31424ca0a1d02d10011f2d3c32d49c8e8a3e7c96
tree2a8bfd1b92606d473e8c205770997cd3106db2f0
parent22d8055aa216b2e39ec48ddaeab31d542fb96bee
pf: Set the pfik_group for userspace

Userspace relies on this pointer to work out if the kif is a group or
not. It can't use it for anything else, because it's a pointer to a
kernel address. Substitute 0xfeedc0de for 'true', so that we don't leak
kernel memory addresses to userspace.

PR: 255852
Reviewed by: donner
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30284

(cherry picked from commit d69cc040147284c414dfd1c9f498dcc7c8291a8b)
sys/netpfil/pf/pf_if.c