From: Simon Horman <horms@kernel.org>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org, steffen.klassert@secunet.com,
Julian Wiedmann <jwiedmann.dev@gmail.com>
Subject: Re: [PATCH ipsec-next] xfrm: policy: fix null dereference
Date: Fri, 30 Aug 2024 17:37:37 +0100 [thread overview]
Message-ID: <20240830163737.GV1368797@kernel.org> (raw)
In-Reply-To: <20240830143920.9478-1-fw@strlen.de>
On Fri, Aug 30, 2024 at 04:39:10PM +0200, Florian Westphal wrote:
> Julian Wiedmann says:
> > + if (!xfrm_pol_hold_rcu(ret))
>
> Coverity spotted that ^^^ needs a s/ret/pol fix-up:
>
> > CID 1599386: Null pointer dereferences (FORWARD_NULL)
> > Passing null pointer "ret" to "xfrm_pol_hold_rcu", which dereferences it.
>
> Ditch the bogus 'ret' variable.
>
> Fixes: 563d5ca93e88 ("xfrm: switch migrate to xfrm_policy_lookup_bytype")
> Reported-by: Julian Wiedmann <jwiedmann.dev@gmail.com>
> Closes: https://lore.kernel.org/netdev/06dc2499-c095-4bd4-aee3-a1d0e3ec87c4@gmail.com/
> Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-08-30 16:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 13:04 [PATCH ipsec-next 0/4] xfrm: speed up policy insertions Florian Westphal
2024-08-22 13:04 ` [PATCH ipsec-next 1/4] selftests: add xfrm policy insertion speed test script Florian Westphal
2024-08-22 13:04 ` [PATCH ipsec-next 2/4] xfrm: policy: don't iterate inexact policies twice at insert time Florian Westphal
2024-08-22 13:04 ` [PATCH ipsec-next 3/4] xfrm: switch migrate to xfrm_policy_lookup_bytype Florian Westphal
2024-08-30 14:49 ` Julian Wiedmann
2024-08-30 14:39 ` [PATCH ipsec-next] xfrm: policy: fix null dereference Florian Westphal
2024-08-30 16:37 ` Simon Horman [this message]
2024-09-10 6:43 ` Steffen Klassert
2024-08-22 13:04 ` [PATCH ipsec-next 4/4] xfrm: policy: remove remaining use of inexact list Florian Westphal
2024-08-27 8:55 ` [PATCH ipsec-next 0/4] xfrm: speed up policy insertions Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240830163737.GV1368797@kernel.org \
--to=horms@kernel.org \
--cc=fw@strlen.de \
--cc=jwiedmann.dev@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.