Netdev List
 help / color / mirror / Atom feed
* [BUG] net: xfrm: possible null-pointer dereferences in xfrm_policy()
@ 2019-07-29  3:43 Jia-Ju Bai
  2019-07-29  8:03 ` Steffen Klassert
  0 siblings, 1 reply; 3+ messages in thread
From: Jia-Ju Bai @ 2019-07-29  3:43 UTC (permalink / raw)
  To: steffen.klassert, herbert, davem; +Cc: netdev, linux-kernel

In xfrm_policy(), the while loop on lines 3802-3830 ends when dst->xfrm 
is NULL.
Then, dst->xfrm is used on line 3840:
     xfrm_state_mtu(dst->xfrm, mtu);
         if (x->km.state != XFRM_STATE_VALID...)
         aead = x->data;

Thus, possible null-pointer dereferences may occur.

These bugs are found by a static analysis tool STCheck written by us.

I do not know how to correctly fix these bugs, so I only report them.


Best wishes,
Jia-Ju Bai


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-29  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-29  3:43 [BUG] net: xfrm: possible null-pointer dereferences in xfrm_policy() Jia-Ju Bai
2019-07-29  8:03 ` Steffen Klassert
2019-07-29  8:06   ` Jia-Ju Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox