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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Apr 2022 08:52:58 -0400
From:   "Martin K. Petersen" <martin.petersen@...cle.com>
To:     Xiaomeng Tong <xiam0nd.tong@...il.com>
Cc:     oliver@...kum.org, aliakc@....de, lenehan@...bble.org,
        jejb@...ux.ibm.com, martin.petersen@...cle.com, dc395x@...bble.org,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [RESEND][PATCH] scsi: dc395x: fix a missing check on list iterator


Xiaomeng,

> The bug is here:
> 	p->target_id, p->target_lun);
>
> The list iterator 'p' will point to a bogus position containing HEAD
> if the list is empty or no element is found. This case must be checked
> before any use of the iterator, otherwise it will lead to a invalid
> memory access.
>
> To fix this bug, add an check. Use a new variable 'iter' as the list
> iterator, while use the origin variable 'p' as a dedicated pointer to
> point to the found element.

Applied to 5.19/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ