Linux: firewire: core: fix race condition in split transaction handling
What fixes it
- 7f9f2d6abc40f79e802b4063859eda343043b85cLinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
firewire: core: fix race condition in split transaction handling
For a split transaction, either fw_core_handle_response() or split_transaction_timeout_callback() may manipulate the same transaction entry in the pending transaction list. The return value of timer_delete() is used to determine which function handles the entry. If the transaction is a split transaction and timer_delete() returns zero, the timeout callback may already be running. In this case, the response handler must leave the entry in the list for the timeout callback to remove.
A previous code refactoring broke this behavior, introducing a race condition in which both functions could process the same transaction. This could lead to a use-after-free on the transaction initiator side.
Fix the regression by ensuring that the response handler does not process the transaction when timer_delete() returns zero. The timeout callback is responsible for removing the entry from the pending transaction list.
Text from CVE List
Affected versions 6
- Linuxaffected: fa2dc27100768a8a994c377051fa17a47cc66c76 before a8caee0e623ca5d56e829032f9ec073c09e4d224CVE List
- Linuxaffected: fa2dc27100768a8a994c377051fa17a47cc66c76 before 7f9f2d6abc40f79e802b4063859eda343043b85cCVE List
- Linuxaffected: 6.19CVE List
- Linuxunaffected: all versions before 6.19CVE List
- Linuxunaffected: 7.2.13 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List