{
    "data_version": "4.0",
    "data_type": "CVE",
    "data_format": "MITRE",
    "CVE_data_meta": {
        "ID": "CVE-2024-26738",
        "ASSIGNER": "cve@kernel.org",
        "STATE": "PUBLIC"
    },
    "description": {
        "description_data": [
            {
                "lang": "eng",
                "value": "In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/pseries/iommu: DLPAR add doesn't completely initialize pci_controller\n\nWhen a PCI device is dynamically added, the kernel oopses with a NULL\npointer dereference:\n\n  BUG: Kernel NULL pointer dereference on read at 0x00000030\n  Faulting instruction address: 0xc0000000006bbe5c\n  Oops: Kernel access of bad area, sig: 11 [#1]\n  LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries\n  Modules linked in: rpadlpar_io rpaphp rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs xsk_diag bonding nft_compat nf_tables nfnetlink rfkill binfmt_misc dm_multipath rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_target_mod target_core_mod ib_umad ib_iser libiscsi scsi_transport_iscsi ib_ipoib rdma_cm iw_cm ib_cm mlx5_ib ib_uverbs ib_core pseries_rng drm drm_panel_orientation_quirks xfs libcrc32c mlx5_core mlxfw sd_mod t10_pi sg tls ibmvscsi ibmveth scsi_transport_srp vmx_crypto pseries_wdt psample dm_mirror dm_region_hash dm_log dm_mod fuse\n  CPU: 17 PID: 2685 Comm: drmgr Not tainted 6.7.0-203405+ #66\n  Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_008) hv:phyp pSeries\n  NIP:  c0000000006bbe5c LR: c000000000a13e68 CTR: c0000000000579f8\n  REGS: c00000009924f240 TRAP: 0300   Not tainted  (6.7.0-203405+)\n  MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 24002220  XER: 20040006\n  CFAR: c000000000a13e64 DAR: 0000000000000030 DSISR: 40000000 IRQMASK: 0\n  ...\n  NIP sysfs_add_link_to_group+0x34/0x94\n  LR  iommu_device_link+0x5c/0x118\n  Call Trace:\n   iommu_init_device+0x26c/0x318 (unreliable)\n   iommu_device_link+0x5c/0x118\n   iommu_init_device+0xa8/0x318\n   iommu_probe_device+0xc0/0x134\n   iommu_bus_notifier+0x44/0x104\n   notifier_call_chain+0xb8/0x19c\n   blocking_notifier_call_chain+0x64/0x98\n   bus_notify+0x50/0x7c\n   device_add+0x640/0x918\n   pci_device_add+0x23c/0x298\n   of_create_pci_dev+0x400/0x884\n   of_scan_pci_dev+0x124/0x1b0\n   __of_scan_bus+0x78/0x18c\n   pcibios_scan_phb+0x2a4/0x3b0\n   init_phb_dynamic+0xb8/0x110\n   dlpar_add_slot+0x170/0x3b8 [rpadlpar_io]\n   add_slot_store.part.0+0xb4/0x130 [rpadlpar_io]\n   kobj_attr_store+0x2c/0x48\n   sysfs_kf_write+0x64/0x78\n   kernfs_fop_write_iter+0x1b0/0x290\n   vfs_write+0x350/0x4a0\n   ksys_write+0x84/0x140\n   system_call_exception+0x124/0x330\n   system_call_vectored_common+0x15c/0x2ec\n\nCommit a940904443e4 (\"powerpc/iommu: Add iommu_ops to report capabilities\nand allow blocking domains\") broke DLPAR add of PCI devices.\n\nThe above added iommu_device structure to pci_controller. During\nsystem boot, PCI devices are discovered and this newly added iommu_device\nstructure is initialized by a call to iommu_device_register().\n\nDuring DLPAR add of a PCI device, a new pci_controller structure is\nallocated but there are no calls made to iommu_device_register()\ninterface.\n\nFix is to register the iommu device during DLPAR add as well."
            }
        ]
    },
    "problemtype": {
        "problemtype_data": [
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "n/a"
                    }
                ]
            }
        ]
    },
    "affects": {
        "vendor": {
            "vendor_data": [
                {
                    "vendor_name": "Linux",
                    "product": {
                        "product_data": [
                            {
                                "product_name": "Linux",
                                "version": {
                                    "version_data": [
                                        {
                                            "version_affected": "<",
                                            "version_name": "a940904443e4",
                                            "version_value": "b8315b2e25b4"
                                        },
                                        {
                                            "version_value": "not down converted",
                                            "x_cve_json_5_version_data": {
                                                "versions": [
                                                    {
                                                        "version": "6.4",
                                                        "status": "affected"
                                                    },
                                                    {
                                                        "version": "0",
                                                        "lessThan": "6.4",
                                                        "status": "unaffected",
                                                        "versionType": "custom"
                                                    },
                                                    {
                                                        "version": "6.6.19",
                                                        "lessThanOrEqual": "6.6.*",
                                                        "status": "unaffected",
                                                        "versionType": "custom"
                                                    },
                                                    {
                                                        "version": "6.7.7",
                                                        "lessThanOrEqual": "6.7.*",
                                                        "status": "unaffected",
                                                        "versionType": "custom"
                                                    },
                                                    {
                                                        "version": "6.8",
                                                        "lessThanOrEqual": "*",
                                                        "status": "unaffected",
                                                        "versionType": "original_commit_for_fix"
                                                    }
                                                ],
                                                "defaultStatus": "affected"
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    },
    "references": {
        "reference_data": [
            {
                "url": "https://git.kernel.org/stable/c/b8315b2e25b4e68e42fcb74630f824b9a5067765",
                "refsource": "MISC",
                "name": "https://git.kernel.org/stable/c/b8315b2e25b4e68e42fcb74630f824b9a5067765"
            },
            {
                "url": "https://git.kernel.org/stable/c/46e36ebd5e00a148b67ed77c1d31675996f77c25",
                "refsource": "MISC",
                "name": "https://git.kernel.org/stable/c/46e36ebd5e00a148b67ed77c1d31675996f77c25"
            },
            {
                "url": "https://git.kernel.org/stable/c/a5c57fd2e9bd1c8ea8613a8f94fd0be5eccbf321",
                "refsource": "MISC",
                "name": "https://git.kernel.org/stable/c/a5c57fd2e9bd1c8ea8613a8f94fd0be5eccbf321"
            }
        ]
    },
    "generator": {
        "engine": "bippy-a5840b7849dd"
    }
}