* [PATCH nf] netfilter: nf_tables: nft_parse_register can return a negative value
@ 2022-04-12 8:14 Antoine Tenart
2022-04-12 9:31 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Antoine Tenart @ 2022-04-12 8:14 UTC (permalink / raw)
To: pablo, kadlec, fw; +Cc: Antoine Tenart, netfilter-devel, netdev
Since commit 6e1acfa387b9 ("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: 6e1acfa387b9 ("netfilter: nf_tables: validate registers coming from userspace.")
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
---
net/netfilter/nf_tables_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 128ee3b300d6..16c3a39689f4 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9363,7 +9363,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;
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nf] netfilter: nf_tables: nft_parse_register can return a negative value
2022-04-12 8:14 [PATCH nf] netfilter: nf_tables: nft_parse_register can return a negative value Antoine Tenart
@ 2022-04-12 9:31 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2022-04-12 9:31 UTC (permalink / raw)
To: Antoine Tenart; +Cc: kadlec, fw, netfilter-devel, netdev
On Tue, Apr 12, 2022 at 10:14:59AM +0200, Antoine Tenart wrote:
> Since commit 6e1acfa387b9 ("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.
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-12 10:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-12 8:14 [PATCH nf] netfilter: nf_tables: nft_parse_register can return a negative value Antoine Tenart
2022-04-12 9:31 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).