Bug 1221535 (CVE-2021-47121)

Summary: VUL-0: CVE-2021-47121: kernel: net: caif: memory leak in cfusbl_device_notify()
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED INVALID QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: carlos.lopez, mhocko, osalvador
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/397855/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-47121:4.7:(AV:L/AC:H/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: ---

Comment 1 Carlos López 2024-03-18 07:19:45 UTC
master:             Already Fixed
stable:             Already Fixed
SLE15-SP6:          Already Fixed
    ALP-current:    Already Fixed
cve/linux-5.14:     Already Fixed
    SLE15-SP5:      Already Fixed
    SLE15-SP4-LTSS: Already Fixed
cve/linux-5.3:      Not Affected (CONFIG_CAIF_USB disabled)
    SLE15-SP3-LTSS: Affected
    SLE15-SP2-LTSS: Not Affected (CONFIG_CAIF_USB disabled)
cve/linux-4.12:     Not Affected (CONFIG_CAIF_USB disabled)
    SLE12-SP5:      Not Affected (CONFIG_CAIF_USB disabled)
cve/linux-4.4:      Not Affected (CONFIG_CAIF_USB disabled)
    SLE12-SP3-LTSS: Not Affected (CONFIG_CAIF_USB disabled)
    SLE12-SP2-LTSS: Not Affected (CONFIG_CAIF_USB disabled)
cve/linux-3.0:      Not Affected
    SLE11-SP4-LTSS: Not Affected
Comment 5 Michal Hocko 2024-07-15 10:06:50 UTC
caif_enroll_dev can fail when caif_device_alloc fails to allocate caif_device_entry (GFP_KERNEL small allocation) or alloc_percpu(int) fails, neither of which is a feasible attack vector to leak memory. Another is cfcnfg_add_phy_layer failing which would be when "Too many CAIF Link Layers (max 6)" which I cannot really assess. Is this a feasible vector?

Then we have GFP_ATOMIC allocation for cfcnfg_phyinfo. This could be a potential vector. Btw. This should likely be GFP_KERNEL request because this is called from under a mutex so there is no real need for GFP_ATOMIC. Same holds for cffrml_create.
Comment 9 Carlos López 2024-07-16 13:09:17 UTC
Nothing to do, closing.