From: John W. Linville <hidden> Date: 2016-10-25 19:15:25
Commit 36b701fae12ac ("netfilter: nf_tables: validate maximum value of
u32 netlink attributes") introduced nft_parse_u32_check with a return
value of "unsigned int", yet on error it returns "-ERANGE".
This patch corrects the mismatch by changing the return value to "int",
which happens to match the actual users of nft_parse_u32_check already.
Found by Coverity, CID 1373930.
Note that commit 21a9e0f1568ea ("netfilter: nft_exthdr: fix error
handling in nft_exthdr_init()) attempted to address the issue, but
did not address the return type of nft_parse_u32_check.
Signed-off-by: John W. Linville <redacted>
Cc: Laura Garcia Liebana <redacted>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Dan Carpenter <redacted>
Fixes: 0eadf37afc250 ("netfilter: nf_tables: validate maximum value...")
---
include/net/netfilter/nf_tables.h | 2 +-
net/netfilter/nf_tables_api.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: John W. Linville <hidden> Date: 2016-10-25 19:55:56
On Tue, Oct 25, 2016 at 03:08:04PM -0400, John W. Linville wrote:
Commit 36b701fae12ac ("netfilter: nf_tables: validate maximum value of
u32 netlink attributes") introduced nft_parse_u32_check with a return
value of "unsigned int", yet on error it returns "-ERANGE".
This patch corrects the mismatch by changing the return value to "int",
which happens to match the actual users of nft_parse_u32_check already.
Found by Coverity, CID 1373930.
Note that commit 21a9e0f1568ea ("netfilter: nft_exthdr: fix error
handling in nft_exthdr_init()) attempted to address the issue, but
did not address the return type of nft_parse_u32_check.
Signed-off-by: John W. Linville <redacted>
Cc: Laura Garcia Liebana <redacted>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Dan Carpenter <redacted>
Fixes: 0eadf37afc250 ("netfilter: nf_tables: validate maximum value...")
The Fixes line is incorrect -- corrected patch to follow!
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
From: John W. Linville <hidden> Date: 2016-10-25 20:00:23
Commit 36b701fae12ac ("netfilter: nf_tables: validate maximum value of
u32 netlink attributes") introduced nft_parse_u32_check with a return
value of "unsigned int", yet on error it returns "-ERANGE".
This patch corrects the mismatch by changing the return value to "int",
which happens to match the actual users of nft_parse_u32_check already.
Found by Coverity, CID 1373930.
Note that commit 21a9e0f1568ea ("netfilter: nft_exthdr: fix error
handling in nft_exthdr_init()) attempted to address the issue, but
did not address the return type of nft_parse_u32_check.
Signed-off-by: John W. Linville <redacted>
Cc: Laura Garcia Liebana <redacted>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Dan Carpenter <redacted>
Fixes: 36b701fae12ac ("netfilter: nf_tables: validate maximum value...")
---
include/net/netfilter/nf_tables.h | 2 +-
net/netfilter/nf_tables_api.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Pablo Neira Ayuso <pablo@netfilter.org> Date: 2016-10-27 16:26:02
On Tue, Oct 25, 2016 at 03:56:39PM -0400, John W. Linville wrote:
Commit 36b701fae12ac ("netfilter: nf_tables: validate maximum value of
u32 netlink attributes") introduced nft_parse_u32_check with a return
value of "unsigned int", yet on error it returns "-ERANGE".
This patch corrects the mismatch by changing the return value to "int",
which happens to match the actual users of nft_parse_u32_check already.
Found by Coverity, CID 1373930.
Note that commit 21a9e0f1568ea ("netfilter: nft_exthdr: fix error
handling in nft_exthdr_init()) attempted to address the issue, but
did not address the return type of nft_parse_u32_check.