]> git.hungrycats.org Git - linux/commit
Revert "selinux: reject a permission value exceeding the class permission count"
authorWentao Guan <guanwentao@uniontech.com>
Thu, 27 Aug 2026 18:06:02 +0000 (02:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Sep 2026 12:31:46 +0000 (14:31 +0200)
commit71ecdc1ba07fde972d72a182e21d3aab0fd4e36b
treedd7fa297e9e97f66630c11fd1898682137db55d3
parent64561afb42d8390695bf810d9bbd087cbca00291
Revert "selinux: reject a permission value exceeding the class permission count"

This reverts commit 9b46fba7528f58ca09eac67ec7d474ff1e9af066.

The stable pick applied the nprim bound after symtab_insert() because
the upstream context (the SEL_VEC_MAX check from commit 18fa21f10d00
"selinux: more strict policy parsing") does not exist in this tree.
On that error path perm_destroy() frees a key/datum pair that is
already linked into the symtab, leading to a double free when the
failed policydb is torn down.

Drop it here; it is re-applied later in this series in its upstream
form, after its strict-parsing prerequisite.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/selinux/ss/policydb.c