Fix CVE-2022-41858: slip sl_tx_timeout() NULL deref during detach #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In drivers/net/slip/slip.c, sl_tx_timeout() can run while the SLIP device is in progress to detach, which can lead to a NULL pointer dereference and potentially crash the kernel (DoS) or leak internal kernel information; this is tracked as CVE-2022-41858.
Changes
Harden the SLIP timeout path during device teardown so sl_tx_timeout() cannot dereference NULL state while detach is in progress (drivers/net/slip/slip.c).
Security Impact
Prevents a local-triggerable NULL pointer dereference in the SLIP driver timeout/detach race, addressing CVE-2022-41858.
References
Upstream commit: ec4eb8a86ade4d22633e1da2a7d85a846b7d1798; CVE: CVE-2022-41858