linux-stable/drivers/ata
Sergey Shtylyov 07cbdb4807 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:27:50 +02:00
..
acard-ahci.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
ahci.c ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back 2022-04-06 11:08:04 +09:00
ahci.h ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back 2022-04-06 11:08:04 +09:00
ahci_brcm.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_ceva.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_da850.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_dm816.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_imx.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_mtk.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_mvebu.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
ahci_octeon.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_platform.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_qoriq.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_seattle.c
ahci_st.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_sunxi.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ahci_tegra.c
ahci_xgene.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
ata_generic.c
ata_piix.c ata: libata: make ata_host_suspend() *void* 2022-02-19 11:18:35 +09:00
Kconfig ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back 2022-04-06 11:08:04 +09:00
libahci.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
libahci_platform.c Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
libata-acpi.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
libata-core.c ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo() 2022-06-22 14:27:50 +02:00
libata-eh.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
libata-pata-timings.c
libata-pmp.c
libata-sata.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
libata-scsi.c libata: fix translation of concurrent positioning ranges 2022-06-14 18:45:18 +02:00
libata-sff.c ata: libata-sff: Fix compilation warning in ata_sff_lost_interrupt() 2022-04-04 09:49:42 +09:00
libata-trace.c
libata-transport.c ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files 2022-06-14 18:45:18 +02:00
libata-transport.h
libata-zpodd.c
libata.h ata: libata-acpi: kill ata_acpi_on_suspend() 2022-02-02 16:56:49 +09:00
Makefile
pata_acpi.c
pata_ali.c ata: pata_ali: remove redundant return statement 2022-01-14 15:17:17 +09:00
pata_amd.c
pata_arasan_cf.c ata: libata: make ata_host_suspend() *void* 2022-02-19 11:18:35 +09:00
pata_artop.c ata: pata_artop: use *switch* in atp8xx_fixup() 2022-02-19 11:18:42 +09:00
pata_atiixp.c ata: pata_atiixp: make static read-only arrays const 2022-01-31 09:58:32 +09:00
pata_atp867x.c ata: pata_atp867x: convert printk() calls 2022-01-05 19:33:02 +09:00
pata_bk3710.c
pata_buddha.c
pata_cmd64x.c ata: pata_cmd64x: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_cmd640.c ata: pata_cmd640: convert printk() calls 2022-01-05 19:33:02 +09:00
pata_cs5520.c ata: libata: make ata_host_suspend() *void* 2022-02-19 11:18:35 +09:00
pata_cs5530.c
pata_cs5535.c
pata_cs5536.c ata: pata_cs5536: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_cypress.c ata: pata_cypress: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_efar.c
pata_ep93xx.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
pata_falcon.c
pata_ftide010.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
pata_gayle.c
pata_hpt3x2n.c ata: pata_hpt3x2n: disable fast interrupts in prereset() method 2022-02-19 11:18:49 +09:00
pata_hpt3x3.c
pata_hpt37x.c ata changes for 5.18-rc1 2022-03-23 14:35:59 -07:00
pata_hpt366.c ata: pata_hpt366: disable fast interrupts in prereset() method 2022-02-19 11:18:49 +09:00
pata_icside.c
pata_imx.c ata: libata: make ata_host_suspend() *void* 2022-02-19 11:18:35 +09:00
pata_isapnp.c
pata_it821x.c ata: fix read_id() ata port operation interface 2022-01-14 15:17:16 +09:00
pata_it8213.c
pata_ixp4xx_cf.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
pata_jmicron.c
pata_legacy.c
pata_macio.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
pata_marvell.c ata: pata_marvell: Check the 'bmdma_addr' beforing reading 2022-04-22 08:45:06 +09:00
pata_mpc52xx.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
pata_mpiix.c
pata_netcell.c ata: fix read_id() ata port operation interface 2022-01-14 15:17:16 +09:00
pata_ninja32.c
pata_ns87410.c
pata_ns87415.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
pata_octeon_cf.c ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe 2022-06-14 18:45:04 +02:00
pata_of_platform.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
pata_oldpiix.c
pata_opti.c
pata_optidma.c
pata_palmld.c
pata_pcmcia.c
pata_pdc202xx_old.c ata: pata_pdc202xx_old: make static read-only array pio_timing const 2022-01-31 09:58:32 +09:00
pata_pdc2027x.c
pata_piccolo.c
pata_platform.c ata: pata_platform: Make use of platform_get_mem_or_io() 2022-01-31 09:58:31 +09:00
pata_pxa.c ata: pata_pxa: Use platform_get_irq() to get the interrupt 2022-03-10 11:17:59 +09:00
pata_radisys.c
pata_rb532_cf.c
pata_rdc.c
pata_rz1000.c ata: pata_rz1000: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_samsung_cf.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
pata_sc1200.c
pata_sch.c
pata_serverworks.c ata: pata_serverworks: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_sil680.c ata: pata_sil680: convert printk() calls 2022-01-05 19:33:03 +09:00
pata_sis.c
pata_sl82c105.c
pata_triflex.c ata: libata: make ata_host_suspend() *void* 2022-02-19 11:18:35 +09:00
pata_via.c
pdc_adma.c
sata_dwc_460ex.c ata: sata_dwc_460ex: Fix crash due to OOB write 2022-04-04 09:56:34 +09:00
sata_fsl.c ata changes for 5.18-rc1 2022-03-23 14:35:59 -07:00
sata_gemini.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
sata_gemini.h
sata_highbank.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
sata_inic162x.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
sata_mv.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
sata_nv.c
sata_promise.c
sata_promise.h
sata_qstor.c
sata_rcar.c ata: Drop commas after OF match table sentinels 2022-03-07 11:49:10 +09:00
sata_sil.c
sata_sil24.c
sata_sis.c
sata_svw.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
sata_sx4.c ata: sata_sx4: convert printk() calls 2022-01-05 19:33:03 +09:00
sata_uli.c
sata_via.c
sata_vsc.c ata: add/use ata_taskfile::{error|status} fields 2022-02-20 09:06:05 +09:00
sis.h