mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
netfilter: nfnetlink_cthelper: hit EBUSY on updates if size mismatches
[ Upstream commit8971ee8b08] The private helper data size cannot be updated. However, updates that contain NFCTH_PRIV_DATA_LEN might bogusly hit EBUSY even if the size is the same. Fixes:12f7a50533("netfilter: add user-space connection tracking helper infrastructure") 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
5f3429c05e
commit
8d614eebc0
@@ -380,10 +380,14 @@ static int
|
|||||||
nfnl_cthelper_update(const struct nlattr * const tb[],
|
nfnl_cthelper_update(const struct nlattr * const tb[],
|
||||||
struct nf_conntrack_helper *helper)
|
struct nf_conntrack_helper *helper)
|
||||||
{
|
{
|
||||||
|
u32 size;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (tb[NFCTH_PRIV_DATA_LEN])
|
if (tb[NFCTH_PRIV_DATA_LEN]) {
|
||||||
return -EBUSY;
|
size = ntohl(nla_get_be32(tb[NFCTH_PRIV_DATA_LEN]));
|
||||||
|
if (size != helper->data_len)
|
||||||
|
return -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
if (tb[NFCTH_POLICY]) {
|
if (tb[NFCTH_POLICY]) {
|
||||||
ret = nfnl_cthelper_update_policy(helper, tb[NFCTH_POLICY]);
|
ret = nfnl_cthelper_update_policy(helper, tb[NFCTH_POLICY]);
|
||||||
|
|||||||
Reference in New Issue
Block a user