ANDROID: xt_qtaguid: fix UAF race
authorWill McVicker <willmcvicker@google.com>
Tue, 13 Apr 2021 22:59:41 +0000 (15:59 -0700)
committerPDO SCM Team <hudsoncm@motorola.com>
Mon, 6 Sep 2021 11:26:05 +0000 (06:26 -0500)
commit03d35398dbbac00a92164b8ae4af34407576309e
treebbb0700e7d32b0a7fb472d3613e4e63fe92e8d8a
parent981d77c96ce0de1c2a98a3b89eb06d9a61f063cd
ANDROID: xt_qtaguid: fix UAF race

Make sure to hold the sock_tag_list_lock while accessing the tag to
avoid a race between getting the tag and free'ing the tag.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-0695

Bug: 184018316
Fixes: c7ca0ac69702 ("ANDROID: netfilter: xt_qtaguid: add qtaguid matching module")
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I62404bdaa602586e00821a7d4c5f9b9868a0e90a
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2045010
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 e04c6a8a906faadbcd7af351538461ded66c6bae)
net/netfilter/xt_qtaguid.c