+2
−1
Loading
mainline inclusion from mainline-v5.16-rc1 commit f4712fa9 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB2BXB CVE: CVE-2024-50125 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f4712fa993f688d0a48e0c28728fcdeb88c1ea58 -------------------------------- In sco_conn_del, conn->sk is read while holding on to the sco_conn.lock to avoid races with a socket that could be released concurrently. However, in between unlocking sco_conn.lock and calling sock_hold, it's possible for the socket to be freed, which would cause a use-after-free write when sock_hold is finally called. To fix this, the reference count of the socket should be increased while the sco_conn.lock is still held. Signed-off-by:Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com> Signed-off-by:
Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by:
Dong Chenchen <dongchenchen2@huawei.com>