mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-01 18:53:02 +09:00
netfilter: nf_tables: nft_parse_register can return a negative value
[ Upstream commit6c6f9f31ec] Since commit6e1acfa387("netfilter: nf_tables: validate registers coming from userspace.") nft_parse_register can return a negative value, but the function prototype is still returning an unsigned int. Fixes:6e1acfa387("netfilter: nf_tables: validate registers coming from userspace.") Signed-off-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
90c153ca45
commit
96aceacda8
@@ -9208,7 +9208,7 @@ int nft_parse_u32_check(const struct nlattr *attr, int max, u32 *dest)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nft_parse_u32_check);
|
||||
|
||||
static unsigned int nft_parse_register(const struct nlattr *attr, u32 *preg)
|
||||
static int nft_parse_register(const struct nlattr *attr, u32 *preg)
|
||||
{
|
||||
unsigned int reg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user