Repository navigation
Commit 32333ed
Bluetooth: Avoid use of session socket after the session gets freed
The commits 08c30ac "Bluetooth: Remove
RFCOMM session refcnt" and 8ff52f7
"Bluetooth: Return RFCOMM session ptrs to avoid freed session"
allow rfcomm_recv_ua and rfcomm_session_close to delete the session
(and free the corresponding socket) and propagate NULL session pointer
to the upper callers.
Additional fix is required to terminate the loop in rfcomm_process_rx
function to avoid use of freed 'sk' memory.
The issue is only reproducible with kernel option CONFIG_PAGE_POISONING
enabled making freed memory being changed and filled up with fixed char
value used to unmask use-after-free issues.
Signed-off-by: Vignesh Raman <Vignesh_Raman@mentor.com>
Signed-off-by: Vitaly Kuzmichev <Vitaly_Kuzmichev@mentor.com>
Acked-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org1 parent c2aef6e commit 32333ed
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1910 | 1910 | | |
1911 | 1911 | | |
1912 | 1912 | | |
1913 | | - | |
| 1913 | + | |
1914 | 1914 | | |
1915 | | - | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
1916 | 1918 | | |
| 1919 | + | |
1917 | 1920 | | |
1918 | 1921 | | |
1919 | 1922 | | |
| |||
0 commit comments