Bug 1226758 (CVE-2024-38610) - VUL-0: CVE-2024-38610: kernel: drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()
Summary: VUL-0: CVE-2024-38610: kernel: drivers/virt/acrn: fix PFNMAP PTE checks in ac...
Status: NEW
Alias: CVE-2024-38610
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P2 - High : Major
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/411448/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-38610:7.8:(AV:...
Keywords:
Depends on:
Blocks: 1227284
  Show dependency treegraph
 
Reported: 2024-06-21 12:02 UTC by SMASH SMASH
Modified: 2024-07-16 08:30 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-06-21 12:02:46 UTC
In the Linux kernel, the following vulnerability has been resolved:

drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()

Patch series "mm: follow_pte() improvements and acrn follow_pte() fixes".

Patch #1 fixes a bunch of issues I spotted in the acrn driver.  It
compiles, that's all I know.  I'll appreciate some review and testing from
acrn folks.

Patch #2+#3 improve follow_pte(), passing a VMA instead of the MM, adding
more sanity checks, and improving the documentation.  Gave it a quick test
on x86-64 using VM_PAT that ends up using follow_pte().


This patch (of 3):

We currently miss handling various cases, resulting in a dangerous
follow_pte() (previously follow_pfn()) usage.

(1) We're not checking PTE write permissions.

Maybe we should simply always require pte_write() like we do for
pin_user_pages_fast(FOLL_WRITE)? Hard to tell, so let's check for
ACRN_MEM_ACCESS_WRITE for now.

(2) We're not rejecting refcounted pages.

As we are not using MMU notifiers, messing with refcounted pages is
dangerous and can result in use-after-free. Let's make sure to reject them.

(3) We are only looking at the first PTE of a bigger range.

We only lookup a single PTE, but memmap->len may span a larger area.
Let's loop over all involved PTEs and make sure the PFN range is
actually contiguous. Reject everything else: it couldn't have worked
either way, and rather made use access PFNs we shouldn't be accessing.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-38610
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-38610.mbox
https://git.kernel.org/stable/c/5c6705aa47b5b78d7ad36fea832bb69caa5bf49a
https://git.kernel.org/stable/c/afeb0e69627695f759fc73c39c1640dbf8649b32
https://git.kernel.org/stable/c/e873f36ec890bece26ecce850e969917bceebbb6
https://git.kernel.org/stable/c/4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4
https://git.kernel.org/stable/c/2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb
https://git.kernel.org/stable/c/3d6586008f7b638f91f3332602592caa8b00b559
https://www.cve.org/CVERecord?id=CVE-2024-38610
https://bugzilla.redhat.com/show_bug.cgi?id=2293354
Comment 29 Maintenance Automation 2024-07-09 16:30:18 UTC
SUSE-SU-2024:2365-1: An update that solves 38 vulnerabilities and has two security fixes can now be installed.

Category: security (important)
Bug References: 1171988, 1191958, 1195065, 1195254, 1202623, 1218148, 1219224, 1222015, 1223138, 1223384, 1224671, 1224703, 1224749, 1224764, 1224765, 1224766, 1224865, 1225010, 1225047, 1225109, 1225161, 1225184, 1225203, 1225487, 1225518, 1225611, 1225732, 1225749, 1225840, 1225866, 1226563, 1226587, 1226595, 1226670, 1226672, 1226712, 1226732, 1226758, 1226786, 1226962
CVE References: CVE-2020-10135, CVE-2021-3896, CVE-2021-43389, CVE-2021-4439, CVE-2021-47247, CVE-2021-47311, CVE-2021-47328, CVE-2021-47368, CVE-2021-47372, CVE-2021-47379, CVE-2021-47571, CVE-2021-47583, CVE-2022-0435, CVE-2022-22942, CVE-2022-2938, CVE-2022-48711, CVE-2022-48760, CVE-2022-48771, CVE-2023-24023, CVE-2023-52707, CVE-2023-52752, CVE-2023-52881, CVE-2024-26921, CVE-2024-26923, CVE-2024-35789, CVE-2024-35861, CVE-2024-35862, CVE-2024-35864, CVE-2024-35878, CVE-2024-35950, CVE-2024-36894, CVE-2024-36904, CVE-2024-36940, CVE-2024-36964, CVE-2024-38541, CVE-2024-38545, CVE-2024-38559, CVE-2024-38560
Maintenance Incident: [SUSE:Maintenance:34559](https://smelt.suse.de/incident/34559/)
Sources used:
SUSE Linux Enterprise Live Patching 15-SP2 (src):
 kernel-livepatch-SLE15-SP2_Update_50-1-150200.5.3.1
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src):
 kernel-source-5.3.18-150200.24.197.1, kernel-default-base-5.3.18-150200.24.197.1.150200.9.101.1, kernel-syms-5.3.18-150200.24.197.1, kernel-obs-build-5.3.18-150200.24.197.1
SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src):
 kernel-source-5.3.18-150200.24.197.1, kernel-default-base-5.3.18-150200.24.197.1.150200.9.101.1, kernel-syms-5.3.18-150200.24.197.1, kernel-obs-build-5.3.18-150200.24.197.1
SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src):
 kernel-source-5.3.18-150200.24.197.1, kernel-default-base-5.3.18-150200.24.197.1.150200.9.101.1, kernel-syms-5.3.18-150200.24.197.1, kernel-obs-build-5.3.18-150200.24.197.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 30 Maintenance Automation 2024-07-09 16:32:20 UTC
SUSE-SU-2024:2362-1: An update that solves 72 vulnerabilities and has 10 security fixes can now be installed.

Category: security (important)
Bug References: 1156395, 1171988, 1176447, 1176774, 1181147, 1191958, 1195065, 1195254, 1195798, 1202623, 1218148, 1219224, 1219633, 1222015, 1223011, 1223384, 1224671, 1224703, 1224749, 1224764, 1224765, 1224766, 1224865, 1225010, 1225047, 1225109, 1225161, 1225184, 1225203, 1225487, 1225518, 1225611, 1225732, 1225749, 1225840, 1225866, 1226226, 1226537, 1226552, 1226554, 1226557, 1226558, 1226562, 1226563, 1226575, 1226583, 1226585, 1226587, 1226595, 1226614, 1226619, 1226621, 1226624, 1226643, 1226644, 1226645, 1226647, 1226650, 1226669, 1226670, 1226672, 1226674, 1226679, 1226686, 1226691, 1226692, 1226698, 1226703, 1226708, 1226709, 1226711, 1226712, 1226713, 1226715, 1226716, 1226720, 1226721, 1226732, 1226758, 1226762, 1226786, 1226962
CVE References: CVE-2021-3896, CVE-2021-43389, CVE-2021-4439, CVE-2021-47247, CVE-2021-47311, CVE-2021-47328, CVE-2021-47368, CVE-2021-47372, CVE-2021-47379, CVE-2021-47571, CVE-2021-47576, CVE-2021-47583, CVE-2021-47589, CVE-2021-47595, CVE-2021-47596, CVE-2021-47600, CVE-2021-47602, CVE-2021-47609, CVE-2021-47611, CVE-2021-47612, CVE-2021-47617, CVE-2021-47618, CVE-2021-47619, CVE-2021-47620, CVE-2022-0435, CVE-2022-22942, CVE-2022-2938, CVE-2022-48711, CVE-2022-48715, CVE-2022-48717, CVE-2022-48722, CVE-2022-48724, CVE-2022-48726, CVE-2022-48728, CVE-2022-48730, CVE-2022-48732, CVE-2022-48736, CVE-2022-48737, CVE-2022-48738, CVE-2022-48746, CVE-2022-48747, CVE-2022-48748, CVE-2022-48749, CVE-2022-48752, CVE-2022-48754, CVE-2022-48756, CVE-2022-48758, CVE-2022-48759, CVE-2022-48760, CVE-2022-48767, CVE-2022-48768, CVE-2022-48771, CVE-2023-24023, CVE-2023-52707, CVE-2023-52752, CVE-2023-52881, CVE-2024-26822, CVE-2024-26923, CVE-2024-35789, CVE-2024-35861, CVE-2024-35862, CVE-2024-35864, CVE-2024-35878, CVE-2024-35950, CVE-2024-36894, CVE-2024-36904, CVE-2024-36940, CVE-2024-36964, CVE-2024-38541, CVE-2024-38545, CVE-2024-38559, CVE-2024-38560
Maintenance Incident: [SUSE:Maintenance:34562](https://smelt.suse.de/incident/34562/)
Sources used:
openSUSE Leap 15.3 (src):
 kernel-obs-build-5.3.18-150300.59.167.1, kernel-livepatch-SLE15-SP3_Update_46-1-150300.7.3.1, kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1, kernel-source-5.3.18-150300.59.167.1, kernel-obs-qa-5.3.18-150300.59.167.1, kernel-syms-5.3.18-150300.59.167.1
SUSE Linux Enterprise Live Patching 15-SP3 (src):
 kernel-livepatch-SLE15-SP3_Update_46-1-150300.7.3.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src):
 kernel-source-5.3.18-150300.59.167.1, kernel-obs-build-5.3.18-150300.59.167.1, kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1, kernel-syms-5.3.18-150300.59.167.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src):
 kernel-source-5.3.18-150300.59.167.1, kernel-obs-build-5.3.18-150300.59.167.1, kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1, kernel-syms-5.3.18-150300.59.167.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src):
 kernel-source-5.3.18-150300.59.167.1, kernel-obs-build-5.3.18-150300.59.167.1, kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1, kernel-syms-5.3.18-150300.59.167.1
SUSE Enterprise Storage 7.1 (src):
 kernel-source-5.3.18-150300.59.167.1, kernel-obs-build-5.3.18-150300.59.167.1, kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1, kernel-syms-5.3.18-150300.59.167.1
SUSE Linux Enterprise Micro 5.1 (src):
 kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1
SUSE Linux Enterprise Micro 5.2 (src):
 kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1
SUSE Linux Enterprise Micro for Rancher 5.2 (src):
 kernel-default-base-5.3.18-150300.59.167.1.150300.18.98.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 31 Maintenance Automation 2024-07-16 08:30:12 UTC
SUSE-SU-2024:2495-1: An update that solves 28 vulnerabilities and has 13 security fixes can now be installed.

Category: security (important)
Bug References: 1195775, 1216124, 1218148, 1219224, 1220492, 1222015, 1222254, 1222678, 1223384, 1224020, 1224679, 1224696, 1224703, 1224749, 1224764, 1224765, 1224766, 1224935, 1225098, 1225467, 1225487, 1225518, 1225611, 1225732, 1225737, 1225749, 1225840, 1225866, 1226145, 1226211, 1226212, 1226270, 1226587, 1226595, 1226634, 1226758, 1226785, 1226786, 1226789, 1226953, 1226962
CVE References: CVE-2021-47555, CVE-2021-47571, CVE-2023-24023, CVE-2023-52670, CVE-2023-52752, CVE-2023-52837, CVE-2023-52846, CVE-2023-52881, CVE-2024-26745, CVE-2024-26923, CVE-2024-35789, CVE-2024-35861, CVE-2024-35862, CVE-2024-35864, CVE-2024-35869, CVE-2024-35950, CVE-2024-36894, CVE-2024-36899, CVE-2024-36904, CVE-2024-36940, CVE-2024-36964, CVE-2024-36971, CVE-2024-38541, CVE-2024-38545, CVE-2024-38559, CVE-2024-38560, CVE-2024-38564, CVE-2024-38578
Maintenance Incident: [SUSE:Maintenance:34563](https://smelt.suse.de/incident/34563/)
Sources used:
SUSE Manager Retail Branch Server 4.3 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-source-5.14.21-150400.24.125.1
SUSE Manager Server 4.3 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1
openSUSE Leap 15.4 (src):
 kernel-obs-qa-5.14.21-150400.24.125.1, kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-source-5.14.21-150400.24.125.1, kernel-obs-build-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1, kernel-livepatch-SLE15-SP4_Update_28-1-150400.9.3.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1
SUSE Linux Enterprise Micro 5.3 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1
SUSE Linux Enterprise Micro for Rancher 5.4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1
SUSE Linux Enterprise Micro 5.4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1
SUSE Linux Enterprise Live Patching 15-SP4 (src):
 kernel-livepatch-SLE15-SP4_Update_28-1-150400.9.3.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-obs-build-5.14.21-150400.24.125.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-obs-build-5.14.21-150400.24.125.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1
SUSE Linux Enterprise Desktop 15 SP4 LTSS 15-SP4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-obs-build-5.14.21-150400.24.125.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1
SUSE Linux Enterprise Server 15 SP4 LTSS 15-SP4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-obs-build-5.14.21-150400.24.125.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1
SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-obs-build-5.14.21-150400.24.125.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1
SUSE Manager Proxy 4.3 (src):
 kernel-default-base-5.14.21-150400.24.125.1.150400.24.60.1, kernel-source-5.14.21-150400.24.125.1, kernel-syms-5.14.21-150400.24.125.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.