ANDROID: xt_quota2: remove trailing junk which might have a digit in it
authorSam Liddicott <sam@liddicott.com>
Tue, 7 Jan 2014 17:21:53 +0000 (09:21 -0800)
committerPDO SCM Team <hudsoncm@motorola.com>
Mon, 6 Dec 2021 08:56:04 +0000 (03:56 -0500)
commit2d5b2bfaebea3592ddeb736eb3a7aac620a06600
tree8f7094e34582b719b205e2db284ec15747402c4b
parent10628124a48b25417d0dffd084310be07d10e11e
ANDROID: xt_quota2: remove trailing junk which might have a digit in it

Make sure string only contains the characters specified by userspace.

Fix cherry-picked from xtables-extensions project

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-0961

Bug: 196046570
Test: passed netd test suites
Fixes: 10cda83af99d ("ANDROID: netfilter: xt_quota2: adding the
original quota2 from xtables-addons")
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from https://git.code.sf.net/p/xtables-addons/xtables-addons
bc2bcc383c70b293bd816c29523a952ca8736fb5)
Change-Id: I965448564906e5fbf0fe6d6414f44d9e257ea195
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2123622
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 625eb505d4c123adcc699c2a73aeec1390adf03c)
net/netfilter/xt_quota2.c