[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2CjFGCHGaMMTrHu@gondor.apana.org.au>
Date: Tue, 1 Nov 2022 12:39:48 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Thomas Jarosch <thomas.jarosch@...ra2net.com>
Cc: Steffen Klassert <steffen.klassert@...unet.com>,
Antony Antony <antony.antony@...unet.com>,
Sabrina Dubroca <sd@...asysnail.net>,
Leon Romanovsky <leon@...nel.org>, Roth Mark <rothm@...l.com>,
Zhihao Chen <chenzhihao@...zu.com>,
Tobias Brunner <tobias@...ongswan.org>, netdev@...r.kernel.org
Subject: Re: [PATCH] xfrm: Fix oops in __xfrm_state_delete()
On Mon, Oct 31, 2022 at 04:26:12PM +0100, Thomas Jarosch wrote:
>
> diff --git a/net/key/af_key.c b/net/key/af_key.c
> index c85df5b958d2..65a9ede62d65 100644
> --- a/net/key/af_key.c
> +++ b/net/key/af_key.c
> @@ -3382,7 +3382,7 @@ static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr,
> hdr->sadb_msg_len = size / sizeof(uint64_t);
> hdr->sadb_msg_errno = 0;
> hdr->sadb_msg_reserved = 0;
> - hdr->sadb_msg_seq = x->km.seq = get_acqseq();
> + hdr->sadb_msg_seq = get_acqseq();
This looks broken. x->km.seq is part of the state which you are
changing. Shouldn't you do whatever xfrm_user does in the same
situation?
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists