Linux Kernel bis 6.1.79/6.6.18/6.7.6 mm do_swap_page Pufferüberlauf

CVSS Meta Temp ScoreAktueller Exploitpreis (≈)CTI Interest Score
5.4$0-$5k0.00

Zusammenfassunginfo

Es wurde eine Schwachstelle in Linux Kernel bis 6.1.79/6.6.18/6.7.6 entdeckt. Sie wurde als kritisch eingestuft. Dabei betrifft es die Funktion do_swap_page der Komponente mm. Mittels dem Manipulieren mit unbekannten Daten kann eine Pufferüberlauf-Schwachstelle ausgenutzt werden. Diese Sicherheitslücke ist unter CVE-2024-26759 bekannt. Es steht kein Exploit zur Verfügung. Es wird geraten, die betroffene Komponente zu aktualisieren.

Detailsinfo

Eine kritische Schwachstelle wurde in Linux Kernel bis 6.1.79/6.6.18/6.7.6 entdeckt. Es geht hierbei um die Funktion do_swap_page der Komponente mm. Durch Manipulieren mit einer unbekannten Eingabe kann eine Pufferüberlauf-Schwachstelle ausgenutzt werden. Klassifiziert wurde die Schwachstelle durch CWE als CWE-121. Das hat Auswirkungen auf Vertraulichkeit, Integrität und Verfügbarkeit. CVE fasst zusammen:

In the Linux kernel, the following vulnerability has been resolved: mm/swap: fix race when skipping swapcache When skipping swapcache for SWP_SYNCHRONOUS_IO, if two or more threads swapin the same entry at the same time, they get different pages (A, B). Before one thread (T0) finishes the swapin and installs page (A) to the PTE, another thread (T1) could finish swapin of page (B), swap_free the entry, then swap out the possibly modified page reusing the same entry. It breaks the pte_same check in (T0) because PTE value is unchanged, causing ABA problem. Thread (T0) will install a stalled page (A) into the PTE and cause data corruption. One possible callstack is like this: CPU0 CPU1 ---- ---- do_swap_page() do_swap_page() with same entry swap_read_folio() <- read to page A swap_read_folio() <- read to page B ... set_pte_at() swap_free() <- entry is free pte_same() <- Check pass, PTE seems unchanged, but page A is stalled! swap_free() <- page B content lost! set_pte_at() <- staled page A installed! And besides, for ZRAM, swap_free() allows the swap device to discard the entry content, so even if page (B) is not modified, if swap_read_folio() on CPU0 happens later than swap_free() on CPU1, it may also cause data loss. To fix this, reuse swapcache_prepare which will pin the swap entry using the cache flag, and allow only one thread to swap it in, also prevent any parallel code from putting the entry in the cache. Release the pin after PT unlocked. Racers just loop and wait since it's a rare and very short event. A schedule_timeout_uninterruptible(1) call is added to avoid repeated page faults wasting too much CPU, causing livelock or adding too much noise to perf statistics. A similar livelock issue was described in commit 029c4628b2eb ("mm: swap: get rid of livelock in swapin readahead") Reproducer: This race issue can be triggered easily using a well constructed reproducer and patched brd (with a delay in read path) [1]: With latest 6.8 mainline, race caused data loss can be observed easily: $ gcc -g -lpthread test-thread-swap-race.c && ./a.out Polulating 32MB of memory region... Keep swapping out... Starting round 0... Spawning 65536 workers... 32746 workers spawned, wait for done... Round 0: Error on 0x5aa00, expected 32746, got 32743, 3 data loss! Round 0: Error on 0x395200, expected 32746, got 32743, 3 data loss! Round 0: Error on 0x3fd000, expected 32746, got 32737, 9 data loss! Round 0 Failed, 15 data loss! This reproducer spawns multiple threads sharing the same memory region using a small swap device. Every two threads updates mapped pages one by one in opposite direction trying to create a race, with one dedicated thread keep swapping out the data out using madvise. The reproducer created a reproduce rate of about once every 5 minutes, so the race should be totally possible in production. After this patch, I ran the reproducer for over a few hundred rounds and no data loss observed. Performance overhead is minimal, microbenchmark swapin 10G from 32G zram: Before: 10934698 us After: 11157121 us Cached: 13155355 us (Dropping SWP_SYNCHRONOUS_IO flag) [[email protected]: v4] Link: https://lkml.kernel.org/r/[email protected]

Das Advisory kann von git.kernel.org heruntergeladen werden. Die Identifikation der Schwachstelle findet seit dem 19.02.2024 als CVE-2024-26759 statt. Das Ausnutzen gilt als leicht. Zur Schwachstelle sind technische Details bekannt, ein verfügbarer Exploit jedoch nicht.

Für den Vulnerability Scanner Nessus wurde ein Plugin mit der ID 208425 (SUSE SLES15 Security Update : kernel (SUSE-SU-2024:3553-1)) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann.

Ein Upgrade auf die Version 6.1.80, 6.6.19, 6.7.7 oder 6.8 vermag dieses Problem zu beheben. Die Schwachstelle lässt sich auch durch das Einspielen des Patches 2dedda77d449/305152314df8/d183a4631acf/13ddaf26be32 beheben. Dieser kann von git.kernel.org bezogen werden. Als bestmögliche Massnahme wird das Aktualisieren auf eine neue Version empfohlen.

Unter anderem wird der Fehler auch in den Datenbanken von Tenable (208425) und CERT Bund (WID-SEC-2024-0773) dokumentiert. VulDB is the best source for vulnerability data and more expert information about this specific topic.

Betroffen

  • Debian Linux
  • Amazon Linux 2
  • Red Hat Enterprise Linux
  • Ubuntu Linux
  • SUSE Linux
  • IBM InfoSphere Guardium
  • Oracle Linux
  • NetApp FAS
  • EMC Avamar
  • Oracle VM
  • NetApp AFF
  • Dell NetWorker
  • IBM Security Guardium
  • RESF Rocky Linux
  • Open Source Linux Kernel
  • SolarWinds Security Event Manager
  • Broadcom Brocade SANnav
  • IBM Business Automation Workflow
  • IBM Spectrum Protect Plus
  • IBM QRadar SIEM
  • Juniper Junos Space
  • IBM DB2
  • IBM Storage Scale System

Produktinfo

Typ

Hersteller

Name

Version

Lizenz

Webseite

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍

CVSSv3info

VulDB Meta Base Score: 5.5
VulDB Meta Temp Score: 5.4

VulDB Base Score: 5.5
VulDB Temp Score: 5.3
VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍

NVD Base Score: 5.5
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VektorKomplexitätAuthentisierungVertraulichkeitIntegritätVerfügbarkeit
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Zuverlässigkeit: 🔍

Exploitinginfo

Klasse: Pufferüberlauf
CWE: CWE-121 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physisch: Teilweise
Lokal: Ja
Remote: Teilweise

Verfügbarkeit: 🔍
Status: Nicht definiert

EPSS Score: 🔍
EPSS Percentile: 🔍

Preisentwicklung: 🔍
Aktuelle Preisschätzung: 🔍

0-Dayfreischaltenfreischaltenfreischaltenfreischalten
Heutefreischaltenfreischaltenfreischaltenfreischalten

Nessus ID: 208425
Nessus Name: SUSE SLES15 Security Update : kernel (SUSE-SU-2024:3553-1)

Threat Intelligenceinfo

Interesse: 🔍
Aktive Akteure: 🔍
Aktive APT Gruppen: 🔍

Gegenmassnahmeninfo

Empfehlung: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 6.1.80/6.6.19/6.7.7/6.8
Patch: 2dedda77d449/305152314df8/d183a4631acf/13ddaf26be32

Timelineinfo

19.02.2024 🔍
03.04.2024 +43 Tage 🔍
03.04.2024 +0 Tage 🔍
03.08.2025 +487 Tage 🔍

Quelleninfo

Hersteller: kernel.org

Advisory: git.kernel.org
Status: Bestätigt

CVE: CVE-2024-26759 (🔍)
GCVE (CVE): GCVE-0-2024-26759
GCVE (VulDB): GCVE-100-259256
CERT Bund: WID-SEC-2024-0773 - Linux Kernel: Mehrere Schwachstellen

Eintraginfo

Erstellt: 03.04.2024 19:28
Aktualisierung: 03.08.2025 21:52
Anpassungen: 03.04.2024 19:28 (58), 09.10.2024 18:35 (3), 17.03.2025 21:49 (11), 03.08.2025 21:52 (7)
Komplett: 🔍
Cache ID: 216::103

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Diskussion

Bisher keine Kommentare. Sprachen: de + en.

Bitte loggen Sie sich ein, um kommentieren zu können.

Might our Artificial Intelligence support you?

Check our Alexa App!