netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Use-after-free access in j1939_session_deactivate
@ 2021-07-12 22:40 Xiaochen Zou
  2021-07-13  4:43 ` Greg KH
  2021-07-13  7:10 ` Oleksij Rempel
  0 siblings, 2 replies; 7+ messages in thread
From: Xiaochen Zou @ 2021-07-12 22:40 UTC (permalink / raw)
  To: kernel, linux-can, netdev, stable

Hi,
It looks like there are multiple use-after-free accesses in
j1939_session_deactivate()

static bool j1939_session_deactivate(struct j1939_session *session)
{
bool active;

j1939_session_list_lock(session->priv);
active = j1939_session_deactivate_locked(session); //session can be freed inside
j1939_session_list_unlock(session->priv); // It causes UAF read and write

return active;
}

session can be freed by
j1939_session_deactivate_locked->j1939_session_put->__j1939_session_release->j1939_session_destroy->kfree.
Therefore it makes the unlock function perform UAF access.


Best,
Xiaochen Zou
Department of Computer Science & Engineering
University of California, Riverside

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

end of thread, other threads:[~2021-07-13 10:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-12 22:40 Use-after-free access in j1939_session_deactivate Xiaochen Zou
2021-07-13  4:43 ` Greg KH
2021-07-13  7:30   ` Xiaochen Zou
2021-07-13  7:35     ` Marc Kleine-Budde
2021-07-13  7:46       ` Xiaochen Zou
2021-07-13 10:41         ` Greg KH
2021-07-13  7:10 ` Oleksij Rempel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).