nday
CVE-2022-50635

powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe()

Linux / Linux

Divulgation : . nday n’a encore aucune trace de correctif ; cela ne veut pas dire qu’il n’en existe pas. Cette vulnérabilité ne figure dans aucune des quatre sources de PoC. Aucune inscription au catalogue KEV de la CISA à ce jour.

tags 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.

Linux kernel
affected products in the CVE record: Linux · Linux
operating system
affected products in the CVE record: Linux · Linuxthe product type of Linux kernel in nday's product registry
étape actuelle
DIS
divulgation
CVSS
pas encore de score

Cycle de vie

Axe en UTC ; point = minute exacte, barre large = date seule, creux = inconnue ou déduite.
date inconnue
DISdivulguée
2025-12-09T00:00Z
PATcorrectif
aucune donnée
ANAanalyse
aucune donnée
POCPoC
aucune donnée
ITWexploitée
aucune donnée
KEVKEV
aucune donnée

Résumé

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

powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe()

I found a null pointer reference in arch_prepare_kprobe():

# echo 'p cmdline_proc_show' > kprobe_events
# echo 'p cmdline_proc_show+16' >> kprobe_events
Kernel attempted to read user page (0) - exploit attempt? (uid: 0)
BUG: Kernel NULL pointer dereference on read at 0x00000000
Faulting instruction address: 0xc000000000050bfc
Oops: Kernel access of bad area, sig: 11 [#1]
LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV
Modules linked in:
CPU: 0 PID: 122 Comm: sh Not tainted 6.0.0-rc3-00007-gdcf8e5633e2e #10
NIP:  c000000000050bfc LR: c000000000050bec CTR: 0000000000005bdc
REGS: c0000000348475b0 TRAP: 0300   Not tainted  (6.0.0-rc3-00007-gdcf8e5633e2e)
MSR:  9000000000009033 <SF,HV,EE,ME,IR,DR,RI,LE>  CR: 88002444  XER: 20040006
CFAR: c00000000022d100 DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 0
...
NIP arch_prepare_kprobe+0x10c/0x2d0
LR  arch_prepare_kprobe+0xfc/0x2d0
Call Trace:
  0xc0000000012f77a0 (unreliable)
  register_kprobe+0x3c0/0x7a0
  __register_trace_kprobe+0x140/0x1a0
  __trace_kprobe_create+0x794/0x1040
  trace_probe_create+0xc4/0xe0
  create_or_delete_trace_kprobe+0x2c/0x80
  trace_parse_run_command+0xf0/0x210
  probes_write+0x20/0x40
  vfs_write+0xfc/0x450
  ksys_write+0x84/0x140
  system_call_exception+0x17c/0x3a0
  system_call_vectored_common+0xe8/0x278
--- interrupt: 3000 at 0x7fffa5682de0
NIP:  00007fffa5682de0 LR: 0000000000000000 CTR: 0000000000000000
REGS: c000000034847e80 TRAP: 3000   Not tainted  (6.0.0-rc3-00007-gdcf8e5633e2e)
MSR:  900000000280f033 <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 44002408  XER: 00000000

The address being probed has some special:

cmdline_proc_show: Probe based on ftrace cmdline_proc_show+16: Probe for the next instruction at the ftrace location

The ftrace-based kprobe does not generate kprobe::ainsn::insn, it gets set to NULL. In arch_prepare_kprobe() it will check for:

...
prev = get_kprobe(p->addr - 1);
preempt_enable_no_resched();
if (prev && ppc_inst_prefixed(ppc_inst_read(prev->ainsn.insn))) {
...

If prev is based on ftrace, 'ppc_inst_read(prev->ainsn.insn)' will occur with a null pointer reference. At this point prev->addr will not be a prefixed instruction, so the check can be skipped.

Check if prev is ftrace-based kprobe before reading 'prev->ainsn.insn' to fix this problem.

[mpe: Trim oops]

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

Journal des événements

+DISdivulgation

Fiche CVE publiée par Linux.

source cvelist · importé en masse par nday le · brut
{
  "id": 279853,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2022-50635",
  "occurred_at": "2025-12-09T00:00:08.59Z",
  "observed_at": "2026-11-13T05:37:51.196939Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "state": "PUBLISHED",
    "date_published": "2025-12-09T00:00:08.590Z",
    "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.

Échanges entre chercheurs

0 chercheur en a parlé ces 7 derniers jours

Publications sur X de chercheurs suivis par nday citant cette CVE, telles que publiées. nday ne les vérifie pas.

nday n’a encore recueilli aucune publication sur X d’un chercheur de sa liste citant cette CVE.

Discussion

0 comments

No comments yet.