Unverified Commit 6c2da8ff authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4550 [sync] PR-4461: netfilter: nf_tables: reject QUEUE/DROP verdict parameters

parents ecc18b7e 85d610ca
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -8967,16 +8967,10 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,
	data->verdict.code = ntohl(nla_get_be32(tb[NFTA_VERDICT_CODE]));

	switch (data->verdict.code) {
	default:
		switch (data->verdict.code & NF_VERDICT_MASK) {
	case NF_ACCEPT:
	case NF_DROP:
	case NF_QUEUE:
		break;
		default:
			return -EINVAL;
		}
		fallthrough;
	case NFT_CONTINUE:
	case NFT_BREAK:
	case NFT_RETURN:
@@ -9010,6 +9004,8 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,
		chain->use++;
		data->verdict.chain = chain;
		break;
	default:
		return -EINVAL;
	}

	desc->len = sizeof(data->verdict);