Bug 2348254 (CVE-2022-49058)

Summary: CVE-2022-49058 kernel: cifs: potential buffer overflow in handling symlinks
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A buffer overflow vulnerability has been identified in the Linux kernel's Common Internet File System (CIFS) module, specifically within the parse_mf_symlink() function. This flaw is caused by insufficient input validation on the link_len value, which dictates the length of a symbolic link. An attacker could exploit this issue by providing an overly large symlink string, leading to a buffer overflow. This can result in memory corruption, system instability, or a denial-of-service condition.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-02-26 03:23:00 UTC
In the Linux kernel, the following vulnerability has been resolved:

cifs: potential buffer overflow in handling symlinks

Smatch printed a warning:
	arch/x86/crypto/poly1305_glue.c:198 poly1305_update_arch() error:
	__memcpy() 'dctx->buf' too small (16 vs u32max)

It's caused because Smatch marks 'link_len' as untrusted since it comes
from sscanf(). Add a check to ensure that 'link_len' is not larger than
the size of the 'link_str' buffer.

Comment 1 Avinash Hanwate 2025-02-26 14:03:09 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022653-CVE-2022-49058-5df2@gregkh/T

Comment 4 Avinash Hanwate 2025-02-26 18:13:29 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022653-CVE-2022-49058-5df2@gregkh/T

Comment 10 errata-xmlrpc 2025-07-16 05:45:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2025:11299 https://access.redhat.com/errata/RHSA-2025:11299

Comment 11 errata-xmlrpc 2025-07-16 05:58:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2025:11298 https://access.redhat.com/errata/RHSA-2025:11298

Comment 14 errata-xmlrpc 2025-07-23 00:22:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.6 Telecommunications Update Service

Via RHSA-2025:11570 https://access.redhat.com/errata/RHSA-2025:11570

Comment 15 errata-xmlrpc 2025-07-30 06:05:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On

Via RHSA-2025:12238 https://access.redhat.com/errata/RHSA-2025:12238

Comment 18 errata-xmlrpc 2025-08-04 05:09:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Advanced Update Support

Via RHSA-2025:12623 https://access.redhat.com/errata/RHSA-2025:12623

Comment 19 errata-xmlrpc 2025-08-05 15:48:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2025:13029 https://access.redhat.com/errata/RHSA-2025:13029

Comment 20 errata-xmlrpc 2025-08-05 15:55:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2025:13030 https://access.redhat.com/errata/RHSA-2025:13030

Comment 21 errata-xmlrpc 2025-08-05 17:57:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2025:13061 https://access.redhat.com/errata/RHSA-2025:13061