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]
Date: Thu, 20 Jun 2024 09:43:34 -0700
From: Justin Tee <justintee8345@...il.com>
To: Huai-Yuan Liu <qq810974084@...il.com>
Cc: Justin Tee <justin.tee@...adcom.com>, james.smart@...adcom.com, 
	dick.kennedy@...adcom.com, James.Bottomley@...senpartnership.com, 
	martin.petersen@...cle.com, linux-scsi@...r.kernel.org, 
	linux-kernel@...r.kernel.org, baijiaju1990@...il.com
Subject: Re: [PATCH V3] scsi: lpfc: Fix a possible null pointer dereference

Hi Huai-Yuan,

Sorry for noticing this later, but a return len while len is 0 would
result in a silent $(cat /sys/class/scsi_host/host*/lpfc_xcvr_data).

Perhaps, it's better to log something to at least notify the user why
SFP information was not able to be collected.

How about something like this?

        /* Get transceiver information */
        rdp_context = kmalloc(sizeof(*rdp_context), GFP_KERNEL);
+       if (!rdp_context) {
+               len = scnprintf(buf, PAGE_SIZE - len,
+                                       "SFP info NA: alloc failure\n");
+               return len;
+       }

        rc = lpfc_get_sfp_info_wait(phba, rdp_context);
        if (rc) {


Thanks,
Justin Tee

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ