Bug 1227995 (CVE-2022-48780)

Summary: VUL-0: CVE-2022-48780: kernel: net/smc: Avoid overwriting the copies of clcsock callback functions
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: NEW --- QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: andrea.mattiazzo, miroslav.franc
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/414234/
Whiteboard: CVSSv3.1:SUSE:CVE-2022-48780:5.5:(AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-07-17 07:48:03 UTC
In the Linux kernel, the following vulnerability has been resolved:

net/smc: Avoid overwriting the copies of clcsock callback functions

The callback functions of clcsock will be saved and replaced during
the fallback. But if the fallback happens more than once, then the
copies of these callback functions will be overwritten incorrectly,
resulting in a loop call issue:

clcsk->sk_error_report
 |- smc_fback_error_report() <------------------------------|
     |- smc_fback_forward_wakeup()                          | (loop)
         |- clcsock_callback()  (incorrectly overwritten)   |
             |- smc->clcsk_error_report() ------------------|

So this patch fixes the issue by saving these function pointers only
once in the fallback and avoiding overwriting.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-48780
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2022/CVE-2022-48780.mbox
https://git.kernel.org/stable/c/7de7ba7a8bd4fde0141de8674c13514d0072f0e6
https://git.kernel.org/stable/c/f00b6c976ae0dfbd9b891175f713f59095d23842
https://git.kernel.org/stable/c/1de9770d121ee9294794cca0e0be8fbfa0134ee8
https://www.cve.org/CVERecord?id=CVE-2022-48780
https://bugzilla.redhat.com/show_bug.cgi?id=2298116