nday
CVE-2022-49196

powerpc/pseries: Fix use after free in remove_phb_dynamic()

Linux / Linux

Fecha de divulgación: . nday aún no tiene constancia de una corrección; eso no significa que no exista parche. Ninguna de las cuatro fuentes de PoC la recoge. No figura en el KEV de CISA.

tags weakness typeuse-after-free accesslocalno user interaction productLinux kernel product typeoperating system
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

use-after-free
CWE-416, stated by the ADP CISA-ADP y NVD, republishing 134c704f-9b21-4f2e-91b3-4a467353bcc0
local
AV:L in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the ADP CISA-ADP
no user interaction
UI:N in CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1) from the ADP CISA-ADP
Linux kernel
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernel
operating system
affected products in the CVE record: Linux · LinuxCPE names NVD's analysts give as vulnerable: o:linux:linux_kernelthe product type of Linux kernel in nday's product registry
etapa
DIS
divulgación
cvss
7.8 HIGH v3.1

Ciclo de vida

Eje x en UTC; punto = minuto exacto, barra ancha = solo fecha, hueco = desconocida o inferida.
fecha desconocida
DISdivulgada
2025-02-26T01:55Z
PATparcheada
sin registro aún
ANAanalizada
sin registro aún
POCPoC
sin registro aún
ITWexplotada
sin registro aún
KEVen KEV
sin registro aún

Descripción

In the Linux kernel, the following vulnerability has been resolved:

powerpc/pseries: Fix use after free in remove_phb_dynamic()

In remove_phb_dynamic() we use &phb->io_resource, after we've called device_unregister(&host_bridge->dev). But the unregister may have freed phb, because pcibios_free_controller_deferred() is the release function for the host_bridge.

If there are no outstanding references when we call device_unregister() then phb will be freed out from under us.

This has gone mainly unnoticed, but with slub_debug and page_poison enabled it can lead to a crash:

PID: 7574   TASK: c0000000d492cb80  CPU: 13  COMMAND: "drmgr"
 #0 [c0000000e4f075a0] crash_kexec at c00000000027d7dc
 #1 [c0000000e4f075d0] oops_end at c000000000029608
 #2 [c0000000e4f07650] __bad_page_fault at c0000000000904b4
 #3 [c0000000e4f076c0] do_bad_slb_fault at c00000000009a5a8
 #4 [c0000000e4f076f0] data_access_slb_common_virt at c000000000008b30

Data SLB Access [380] exception frame:

 R0:  c000000000167250    R1:  c0000000e4f07a00    R2:  c000000002a46100
 R3:  c000000002b39ce8    R4:  00000000000000c0    R5:  00000000000000a9
 R6:  3894674d000000c0    R7:  0000000000000000    R8:  00000000000000ff
 R9:  0000000000000100    R10: 6b6b6b6b6b6b6b6b    R11: 0000000000008000
 R12: c00000000023da80    R13: c0000009ffd38b00    R14: 0000000000000000
 R15: 000000011c87f0f0    R16: 0000000000000006    R17: 0000000000000003
 R18: 0000000000000002    R19: 0000000000000004    R20: 0000000000000005
 R21: 000000011c87ede8    R22: 000000011c87c5a8    R23: 000000011c87d3a0
 R24: 0000000000000000    R25: 0000000000000001    R26: c0000000e4f07cc8
 R27: c00000004d1cc400    R28: c0080000031d00e8    R29: c00000004d23d800
 R30: c00000004d1d2400    R31: c00000004d1d2540
 NIP: c000000000167258    MSR: 8000000000009033    OR3: c000000000e9f474
 CTR: 0000000000000000    LR:  c000000000167250    XER: 0000000020040003
 CCR: 0000000024088420    MQ:  0000000000000000    DAR: 6b6b6b6b6b6b6ba3
 DSISR: c0000000e4f07920     Syscall Result: fffffffffffffff2
 [NIP  : release_resource+56]
 [LR   : release_resource+48]
 #5 [c0000000e4f07a00] release_resource at c000000000167258  (unreliable)
 #6 [c0000000e4f07a30] remove_phb_dynamic at c000000000105648
 #7 [c0000000e4f07ab0] dlpar_remove_slot at c0080000031a09e8 [rpadlpar_io]
 #8 [c0000000e4f07b50] remove_slot_store at c0080000031a0b9c [rpadlpar_io]
 #9 [c0000000e4f07be0] kobj_attr_store at c000000000817d8c
#10 [c0000000e4f07c00] sysfs_kf_write at c00000000063e504
#11 [c0000000e4f07c20] kernfs_fop_write_iter at c00000000063d868
#12 [c0000000e4f07c70] new_sync_write at c00000000054339c
#13 [c0000000e4f07d10] vfs_write at c000000000546624
#14 [c0000000e4f07d60] ksys_write at c0000000005469f4
#15 [c0000000e4f07db0] system_call_exception at c000000000030840
#16 [c0000000e4f07e10] system_call_vectored_common at c00000000000c168

To avoid it, we can take a reference to the host_bridge->dev until we're done using phb. Then when we drop the reference the phb will be freed.

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:L
Local: needs a local or SSH session, or a user tricked into acting on the machine
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:L
Low: ordinary user privileges
User interaction UI:N
None: no action by anyone other than the attacker

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS 3.1 vector from the CVE record, added by the ADP CISA-ADP.

Registro de eventos

+DISdivulgación

Linux publicó el registro CVE. CVSS 7.8, severidad alta.

fuente cvelist · nday , importación masiva · en bruto
{
  "id": 278654,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2022-49196",
  "occurred_at": "2025-02-26T01:55:40.626Z",
  "observed_at": "2026-11-13T05:37:51.196939Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "adp:CISA-ADP",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "version": "3.1",
      "base_score": 7.8,
      "base_severity": "HIGH"
    },
    "ssvc": {
      "timestamp": "2025-03-04T18:03:23.162575Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "total"
    },
    "state": "PUBLISHED",
    "date_published": "2025-02-26T01:55:40.626Z",
    "assigner_short_name": "Linux"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Debate de investigadores

0 investigadores lo mencionaron en los últimos 7 días

Publicaciones en X de investigadores de la lista de nday que mencionan este CVE, tal como se publicaron. nday no las verifica.

nday aún no ha recopilado publicaciones en X de investigadores de su lista sobre este CVE.

Discussion

0 comments

No comments yet.