The mxms_structlen function returns u16 (2 bytes). Therefore it reads 2 bytes beyond the mxms array. Signed-off-by: Andrey Shumilin <shum.sdl@xxxxxxxx> Found by Linux Verification Center (linuxtesting.org) with SVACE. --- drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c index c1acfe642da3..efd0c874742e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c @@ -47,7 +47,7 @@ mxm_shadow_rom(struct nvkm_mxm *mxm, u8 version) struct nvkm_bios *bios = device->bios; struct nvkm_i2c *i2c = device->i2c; struct nvkm_i2c_bus *bus = NULL; - u8 i2cidx, mxms[6], addr, size; + u8 i2cidx, mxms[8], addr, size; i2cidx = mxm_ddc_map(bios, 1 /* LVDS_DDC */) & 0x0f; if (i2cidx < 0x0f) -- 2.30.2