ANDROID: xt_quota2: set usersize in xt_match registration object
Explicitly set what is visible to userspace
Bug: 196046570
Issue: FP3SEC-162
Test: passed netd test suites
Change-Id: Iacec0ef8ae290e01f1b60508d8abcd40a3653c83
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from commit df6b2e37a1f0edb73f794ffc9b9ea9fa88865440)
diff --git a/net/netfilter/xt_quota2.c b/net/netfilter/xt_quota2.c
index 8c56ff2..3d2ae4e 100644
--- a/net/netfilter/xt_quota2.c
+++ b/net/netfilter/xt_quota2.c
@@ -321,6 +321,7 @@
.match = quota_mt2,
.destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
+ .usersize = offsetof(struct xt_quota_mtinfo2, master),
.me = THIS_MODULE,
},
{
@@ -331,6 +332,7 @@
.match = quota_mt2,
.destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
+ .usersize = offsetof(struct xt_quota_mtinfo2, master),
.me = THIS_MODULE,
},
};