WSL2-Linux-Kernel/drivers/ata
Sergey Shtylyov ff128fbea7 ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
[ Upstream commit bf476fe22a ]

In an unlikely (and probably wrong?) case that the 'ppi' parameter of
ata_host_alloc_pinfo() points to an array starting with a NULL pointer,
there's going to be a kernel oops as the 'pi' local variable won't get
reassigned from the initial value of NULL. Initialize 'pi' instead to
'&ata_dummy_port_info' to fix the possible kernel oops for good...

Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:21:56 +02:00
..
Kconfig
Makefile
acard-ahci.c
ahci.c ata: ahci: Add Green Sardine vendor ID as board_ahci_mobile 2021-12-08 09:04:40 +01:00
ahci.h
ahci_brcm.c
ahci_ceva.c
ahci_da850.c
ahci_dm816.c
ahci_imx.c
ahci_mtk.c
ahci_mvebu.c
ahci_octeon.c
ahci_platform.c
ahci_qoriq.c
ahci_seattle.c
ahci_st.c
ahci_sunxi.c
ahci_tegra.c
ahci_xgene.c
ata_generic.c
ata_piix.c
libahci.c ata: libahci: Adjust behavior when StorageD3Enable _DSD is set 2021-12-08 09:04:40 +01:00
libahci_platform.c ata: ahci_platform: fix null-ptr-deref in ahci_platform_enable_regulators() 2021-10-14 12:22:47 +09:00
libata-acpi.c
libata-core.c ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo() 2022-06-22 14:21:56 +02:00
libata-eh.c libata: fix read log timeout value 2021-11-18 19:15:51 +01:00
libata-pata-timings.c
libata-pmp.c
libata-sata.c
libata-scsi.c libata: if T_LENGTH is zero, dma direction should be DMA_NONE 2021-12-22 09:32:49 +01:00
libata-sff.c
libata-trace.c
libata-transport.c ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files 2022-06-14 18:36:25 +02:00
libata-transport.h
libata-zpodd.c
libata.h
pata_acpi.c
pata_ali.c
pata_amd.c
pata_arasan_cf.c
pata_artop.c
pata_atiixp.c
pata_atp867x.c
pata_bk3710.c
pata_buddha.c
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c
pata_cs5530.c
pata_cs5535.c
pata_cs5536.c
pata_cypress.c
pata_efar.c
pata_ep93xx.c
pata_falcon.c
pata_ftide010.c
pata_gayle.c
pata_hpt3x2n.c
pata_hpt3x3.c
pata_hpt37x.c ata: pata_hpt37x: fix PCI clock detection 2022-03-08 19:12:33 +01:00
pata_hpt366.c
pata_icside.c
pata_imx.c
pata_isapnp.c
pata_it821x.c
pata_it8213.c
pata_ixp4xx_cf.c
pata_jmicron.c
pata_legacy.c pata_legacy: fix a couple uninitialized variable bugs 2021-10-12 09:52:35 +09:00
pata_macio.c
pata_marvell.c ata: pata_marvell: Check the 'bmdma_addr' beforing reading 2022-04-27 14:38:58 +02:00
pata_mpc52xx.c
pata_mpiix.c
pata_netcell.c
pata_ninja32.c
pata_ns87410.c
pata_ns87415.c
pata_octeon_cf.c ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe 2022-06-14 18:36:16 +02:00
pata_of_platform.c
pata_oldpiix.c
pata_opti.c
pata_optidma.c
pata_palmld.c
pata_pcmcia.c
pata_pdc202xx_old.c
pata_pdc2027x.c
pata_piccolo.c
pata_platform.c
pata_pxa.c
pata_radisys.c
pata_rb532_cf.c
pata_rdc.c
pata_rz1000.c
pata_samsung_cf.c
pata_sc1200.c
pata_sch.c
pata_serverworks.c
pata_sil680.c
pata_sis.c
pata_sl82c105.c
pata_triflex.c
pata_via.c
pdc_adma.c
sata_dwc_460ex.c ata: sata_dwc_460ex: Fix crash due to OOB write 2022-04-13 20:59:23 +02:00
sata_fsl.c sata_fsl: fix warning in remove_proc_entry when rmmod sata_fsl 2021-12-08 09:04:42 +01:00
sata_gemini.c
sata_gemini.h
sata_highbank.c
sata_inic162x.c
sata_mv.c ata: sata_mv: Fix the error handling of mv_chip_id() 2021-10-25 08:53:04 +09:00
sata_nv.c
sata_promise.c
sata_promise.h
sata_qstor.c
sata_rcar.c
sata_sil.c
sata_sil24.c
sata_sis.c
sata_svw.c
sata_sx4.c
sata_uli.c
sata_via.c
sata_vsc.c
sis.h