Bug 2460646 (CVE-2026-31474) - CVE-2026-31474 kernel: can: isotp: fix tx.buf use-after-free in isotp_sendmsg()
Summary: CVE-2026-31474 kernel: can: isotp: fix tx.buf use-after-free in isotp_sendmsg()
Keywords:
Status: NEW
Alias: CVE-2026-31474
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-04-22 15:02 UTC by OSIDB Bzimport
Modified: 2026-06-25 12:02 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2026:27288 0 None None None 2026-06-19 23:21:50 UTC
Red Hat Product Errata RHSA-2026:27731 0 None None None 2026-06-22 05:04:16 UTC
Red Hat Product Errata RHSA-2026:27789 0 None None None 2026-06-22 08:28:40 UTC

Description OSIDB Bzimport 2026-04-22 15:02:52 UTC
In the Linux kernel, the following vulnerability has been resolved:

can: isotp: fix tx.buf use-after-free in isotp_sendmsg()

isotp_sendmsg() uses only cmpxchg() on so->tx.state to serialize access
to so->tx.buf. isotp_release() waits for ISOTP_IDLE via
wait_event_interruptible() and then calls kfree(so->tx.buf).

If a signal interrupts the wait_event_interruptible() inside close()
while tx.state is ISOTP_SENDING, the loop exits early and release
proceeds to force ISOTP_SHUTDOWN and continues to kfree(so->tx.buf)
while sendmsg may still be reading so->tx.buf for the final CAN frame
in isotp_fill_dataframe().

The so->tx.buf can be allocated once when the standard tx.buf length needs
to be extended. Move the kfree() of this potentially extended tx.buf to
sk_destruct time when either isotp_sendmsg() and isotp_release() are done.

Comment 5 errata-xmlrpc 2026-06-19 23:21:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:27288 https://access.redhat.com/errata/RHSA-2026:27288

Comment 6 errata-xmlrpc 2026-06-22 05:04:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10.0 Extended Update Support

Via RHSA-2026:27731 https://access.redhat.com/errata/RHSA-2026:27731

Comment 7 errata-xmlrpc 2026-06-22 08:28:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:27789 https://access.redhat.com/errata/RHSA-2026:27789


Note You need to log in before you can comment on or make changes to this bug.