lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6802e83-0fc6-ffe6-cea1-d2a39d768514@gmx.de>
Date:   Fri, 1 Apr 2022 22:53:02 +0200
From:   Helge Deller <deller@....de>
To:     Haowen Bai <baihaowen@...zu.com>,
        Thomas Winischhofer <thomas@...ischhofer.net>
Cc:     linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: fbdev: sis: fix potential NULL dereference in
 sisfb_post_sis300()

On 4/1/22 05:41, Haowen Bai wrote:
> bios could be null without checking null and return in this function,
> but still dereference bios[0xf5].
>
> Signed-off-by: Haowen Bai <baihaowen@...zu.com>

applied.
Thanks!
Helge

> ---
>  drivers/video/fbdev/sis/sis_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
> index 742f629..24a0299 100644
> --- a/drivers/video/fbdev/sis/sis_main.c
> +++ b/drivers/video/fbdev/sis/sis_main.c
> @@ -4463,7 +4463,7 @@ static void sisfb_post_sis300(struct pci_dev *pdev)
>  		SiS_SetReg(SISCR, 0x37, 0x02);
>  		SiS_SetReg(SISPART2, 0x00, 0x1c);
>  		v4 = 0x00; v5 = 0x00; v6 = 0x10;
> -		if(ivideo->SiS_Pr.UseROM) {
> +		if (ivideo->SiS_Pr.UseROM && bios) {
>  			v4 = bios[0xf5];
>  			v5 = bios[0xf6];
>  			v6 = bios[0xf7];

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ