{"id":"CVE-2022-49353","aliases":["CVE-2022-49353"],"related":[],"kind":"vulnerability","state":"published","title":"powerpc/papr_scm: don't requests stats with '0' sized stats buffer","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/papr_scm: don't requests stats with '0' sized stats buffer\n\nSachin reported [1] that on a POWER-10 lpar he is seeing a kernel panic being\nreported with vPMEM when papr_scm probe is being called. The panic is of the\nform below and is observed only with following option disabled(profile) for the\nsaid LPAR 'Enable Performance Information Collection' in the HMC:\n\n Kernel attempted to write user page (1c) - exploit attempt? (uid: 0)\n BUG: Kernel NULL pointer dereference on write at 0x0000001c\n Faulting instruction address: 0xc008000001b90844\n Oops: Kernel access of bad area, sig: 11 [#1]\n<snip>\n NIP [c008000001b90844] drc_pmem_query_stats+0x5c/0x270 [papr_scm]\n LR [c008000001b92794] papr_scm_probe+0x2ac/0x6ec [papr_scm]\n Call Trace:\n       0xc00000000941bca0 (unreliable)\n       papr_scm_probe+0x2ac/0x6ec [papr_scm]\n       platform_probe+0x98/0x150\n       really_probe+0xfc/0x510\n       __driver_probe_device+0x17c/0x230\n<snip>\n ---[ end trace 0000000000000000 ]---\n Kernel panic - not syncing: Fatal exception\n\nOn investigation looks like this panic was caused due to a 'stat_buffer' of\nsize==0 being provided to drc_pmem_query_stats() to fetch all performance\nstats-ids of an NVDIMM. However drc_pmem_query_stats() shouldn't have been called\nsince the vPMEM NVDIMM doesn't support and performance stat-id's. This was caused\ndue to missing check for 'p->stat_buffer_len' at the beginning of\npapr_scm_pmu_check_events() which indicates that the NVDIMM doesn't support\nperformance-stats.\n\nFix this by introducing the check for 'p->stat_buffer_len' at the beginning of\npapr_scm_pmu_check_events().\n\n[1] https://lore.kernel.org/all/6B3A522A-6A5F-4CC9-B268-0C63AA6E07D3@linux.ibm.com","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/papr_scm: don't requests stats with '0' sized stats buffer\n\nSachin reported [1] that on a POWER-10 lpar he is seeing a kernel panic being\nreported with vPMEM when papr_scm probe is being called. The panic is of the\nform below and is observed only with following option disabled(profile) for the\nsaid LPAR 'Enable Performance Information Collection' in the HMC:\n\n Kernel attempted to write user page (1c) - exploit attempt? (uid: 0)\n BUG: Kernel NULL pointer dereference on write at 0x0000001c\n Faulting instruction address: 0xc008000001b90844\n Oops: Kernel access of bad area, sig: 11 [#1]\n<snip>\n NIP [c008000001b90844] drc_pmem_query_stats+0x5c/0x270 [papr_scm]\n LR [c008000001b92794] papr_scm_probe+0x2ac/0x6ec [papr_scm]\n Call Trace:\n       0xc00000000941bca0 (unreliable)\n       papr_scm_probe+0x2ac/0x6ec [papr_scm]\n       platform_probe+0x98/0x150\n       really_probe+0xfc/0x510\n       __driver_probe_device+0x17c/0x230\n<snip>\n ---[ end trace 0000000000000000 ]---\n Kernel panic - not syncing: Fatal exception\n\nOn investigation looks like this panic was caused due to a 'stat_buffer' of\nsize==0 being provided to drc_pmem_query_stats() to fetch all performance\nstats-ids of an NVDIMM. However drc_pmem_query_stats() shouldn't have been called\nsince the vPMEM NVDIMM doesn't support and performance stat-id's. This was caused\ndue to missing check for 'p->stat_buffer_len' at the beginning of\npapr_scm_pmu_check_events() which indicates that the NVDIMM doesn't support\nperformance-stats.\n\nFix this by introducing the check for 'p->stat_buffer_len' at the beginning of\npapr_scm_pmu_check_events().\n\n[1] https://lore.kernel.org/all/6B3A522A-6A5F-4CC9-B268-0C63AA6E07D3@linux.ibm.com","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: powerpc/papr_scm: no solicita estadísticas con un búfer de estadísticas de tamaño '0' Sachin informó [1] que en un LPAR POWER-10 está viendo un pánico del kernel que se informa con vPMEM cuando se llama a la sonda papr_scm. El pánico tiene el formato siguiente y se observa solo con la siguiente opción deshabilitada (perfil) para dicho LPAR 'Habilitar recopilación de información de rendimiento' en la HMC: El kernel intentó escribir la página del usuario (1c): ¿intento de explotación? (uid: 0) ERROR: Desreferencia de puntero NULL del kernel al escribir en 0x0000001c Dirección de instrucción con error: 0xc008000001b90844 Oops: Acceso del kernel al área defectuosa, sig: 11 [#1]  NIP [c008000001b90844] drc_pmem_query_stats+0x5c/0x270 [papr_scm] LR [c008000001b92794] papr_scm_probe+0x2ac/0x6ec [papr_scm] Seguimiento de llamadas: 0xc00000000941bca0 (no confiable) papr_scm_probe+0x2ac/0x6ec [papr_scm] platform_probe+0x98/0x150 really_probe+0xfc/0x510 __driver_probe_device+0x17c/0x230  ---[ fin del seguimiento 0000000000000000 ]--- Pánico del kernel: no se sincroniza: excepción fatal En la investigación, parece que este pánico se produjo debido a que se proporcionó un 'stat_buffer' de tamaño==0 a drc_pmem_query_stats() para obtener todos los identificadores de estadísticas de rendimiento de un NVDIMM. Sin embargo, no se debería haber llamado a drc_pmem_query_stats() ya que el NVDIMM vPMEM no admite ningún identificador de estadísticas de rendimiento. Esto se produjo debido a la falta de verificación de 'p-&gt;stat_buffer_len' al comienzo de papr_scm_pmu_check_events(), lo que indica que el NVDIMM no admite estadísticas de rendimiento. Solucione este problema introduciendo la comprobación de 'p-&gt;stat_buffer_len' al comienzo de papr_scm_pmu_check_events(). [1] https://lore.kernel.org/all/6B3A522A-6A5F-4CC9-B268-0C63AA6E07D3@linux.ibm.com","source":"nvd"}],"published":"2025-02-26T02:11:04.982Z","modified":"2026-06-17T05:17:48.163Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"b073096df4dec70d0436321b7093bad27ae91f9e","fixed":"e1295aab2ebcda1c1a9ed342baedc080e5c393e5","status":"affected"},{"type":"git","introduced":"0e0946e22f3665d27325d389ff45ade6e93f3678","fixed":"07bf9431b1590d1cd7a8d62075d0b50b073f0495","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.18.3","fixed":"5.18.4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","version":"5.18.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:5.18.3:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/e1295aab2ebcda1c1a9ed342baedc080e5c393e5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/07bf9431b1590d1cd7a8d62075d0b50b073f0495","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:42:48.865Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49353","url":"https://www.cve.org/CVERecord?id=CVE-2022-49353","licence":"CVE Terms of Use","modified":"2026-05-11T18:58:03.822Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49353","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49353","licence":"Public domain","modified":"2026-06-17T05:17:48.163Z"}],"updatedAt":"2026-11-25T22:58:20.446Z","epss":{"score":0.0023,"percentile":0.14847,"date":"2026-12-01T12:00:22.000Z"}}