Bug 2265800 (CVE-2023-52464) - CVE-2023-52464 kernel: EDAC/thunderx: Incorrect buffer size in drivers/edac/thunderx_edac.c
Summary: CVE-2023-52464 kernel: EDAC/thunderx: Incorrect buffer size in drivers/edac/t...
Keywords:
Status: NEW
Alias: CVE-2023-52464
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2265812
Blocks: 2265790
TreeView+ depends on / blocked
 
Reported: 2024-02-24 11:20 UTC by Patrick Del Bello
Modified: 2024-11-12 09:18 UTC (History)
50 users (show)

Fixed In Version: kernel 6.8-rc1
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:4354 0 None None None 2024-07-08 07:11:08 UTC
Red Hat Product Errata RHBA-2024:4365 0 None None None 2024-07-08 11:00:49 UTC
Red Hat Product Errata RHBA-2024:4461 0 None None None 2024-07-10 15:55:43 UTC
Red Hat Product Errata RHBA-2024:4463 0 None None None 2024-07-10 18:16:54 UTC
Red Hat Product Errata RHBA-2024:4494 0 None None None 2024-07-11 09:38:58 UTC
Red Hat Product Errata RHBA-2024:4495 0 None None None 2024-07-11 10:35:31 UTC
Red Hat Product Errata RHBA-2024:4507 0 None None None 2024-07-11 13:29:05 UTC
Red Hat Product Errata RHBA-2024:4535 0 None None None 2024-07-15 07:10:45 UTC
Red Hat Product Errata RHSA-2024:4211 0 None None None 2024-07-02 08:54:02 UTC
Red Hat Product Errata RHSA-2024:4352 0 None None None 2024-07-08 02:01:54 UTC
Red Hat Product Errata RHSA-2024:9315 0 None None None 2024-11-12 09:18:45 UTC

Description Patrick Del Bello 2024-02-24 11:20:30 UTC
Enabling -Wstringop-overflow globally exposes a warning for a common bug
in the usage of strncat():

  drivers/edac/thunderx_edac.c: In function 'thunderx_ocx_com_threaded_isr':
  drivers/edac/thunderx_edac.c:1136:17: error: 'strncat' specified bound 1024 equals destination size [-Werror=stringop-overflow=]
   1136 |                 strncat(msg, other, OCX_MESSAGE_SIZE);
        |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ...
   1145 |                                 strncat(msg, other, OCX_MESSAGE_SIZE);
   ...
   1150 |                                 strncat(msg, other, OCX_MESSAGE_SIZE);

   ...

Apparently the author of this driver expected strncat() to behave the
way that strlcat() does, which uses the size of the destination buffer
as its third argument rather than the length of the source buffer. The
result is that there is no check on the size of the allocated buffer.

Change it to strlcat().

  [ bp: Trim compiler output, fixup commit message. ]

Comment 1 Patrick Del Bello 2024-02-24 11:25:57 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2265812]

Comment 3 Justin M. Forbes 2024-02-27 00:00:28 UTC
https://lore.kernel.org/linux-cve-announce/2024022336-CVE-2023-52464-b17c@gregkh/T/#u

	Issue introduced in 4.12 with commit 41003396f932 and fixed in 4.19.306 with commit 71c17ee02538
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 5.4.268 with commit 5da3b6e7196f
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 5.10.209 with commit 6aa7865ba7ff
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 5.15.148 with commit 700cf4bead80
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 6.1.75 with commit 9dbac9fdae6e
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 6.6.14 with commit e1c865112415
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 6.7.2 with commit 426fae93c01d
	Issue introduced in 4.12 with commit 41003396f932 and fixed in 6.8-rc1 with commit 475c58e1a471

Comment 4 Justin M. Forbes 2024-02-27 00:00:54 UTC
This was fixed for Fedora with the 6.6.14 stable kernel updates.

Comment 11 Alex 2024-06-09 16:23:30 UTC
The result of automatic check (that is developed by Alexander Larkin) for this CVE-2023-52464 is: CHECK	Maybe valid. Check manually. with impact LOW (that is an approximation based on flags WRITE OOB WARNONLY IMPROVEONLY  ; these flags parsed automatically based on patch data). Such automatic check happens only for Low/Moderates (and only when not from reporter, but parsing already existing CVE). Highs always checked manually (I check it myself and then we check it again in Remediation team). In rare cases some of the Moderates could be increased to High later.

Comment 15 errata-xmlrpc 2024-07-02 08:53:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:4211 https://access.redhat.com/errata/RHSA-2024:4211

Comment 16 errata-xmlrpc 2024-07-08 02:01:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:4352 https://access.redhat.com/errata/RHSA-2024:4352

Comment 17 errata-xmlrpc 2024-11-12 09:18:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:9315 https://access.redhat.com/errata/RHSA-2024:9315


Note You need to log in before you can comment on or make changes to this bug.