Page MenuHomeFreeBSD

D30284.id89290.diff
No OneTemporary

D30284.id89290.diff

Index: sys/netpfil/pf/pf_if.c
===================================================================
--- sys/netpfil/pf/pf_if.c
+++ sys/netpfil/pf/pf_if.c
@@ -841,6 +841,14 @@
kif->pfik_flags = kkif->pfik_flags;
kif->pfik_tzero = kkif->pfik_tzero;
kif->pfik_rulerefs = kkif->pfik_rulerefs;
+ /*
+ * Userspace relies on this pointer to decide if this is a group or
+ * not. We don't want to share the actual pointer, because it's
+ * useless to userspace and leaks kernel memory layout information.
+ * So instead we provide 0xdeadc0de as 'true' and NULL as 'false'.
+ */
+ kif->pfik_group =
+ kkif->pfik_group ? (struct ifg_group *)0xdeadc0de : NULL;
}
void

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 5:02 AM (19 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15820317
Default Alt Text
D30284.id89290.diff (674 B)

Event Timeline