[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1edxz349n.fsf@ca-mkp.ca.oracle.com>
Date: Mon, 01 Aug 2022 20:01:06 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: jejb@...ux.ibm.com, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai3@...wei.com, zhangwensheng5@...wei.com, yi.zhang@...wei.com
Subject: Re: [PATCH -next] [RFC] scsi: ses: fix slab-out-of-bounds in
ses_enclosure_data_process
> After analysis on vmcore, it was found that the line "desc_ptr[len] =
> '\0';" has slab-out-of-bounds problem in ses_enclosure_data_process.
> In ses_enclosure_data_process, "desc_ptr" point to "buf", so it have
> to be limited in the memory of "buf", however. although there is
> "desc_ptr >= buf + page7_len" judgment, it does not work because
> "desc_ptr + 4 + len" may bigger than "buf + page7_len", which will
> lead to slab-out-of-bounds problem.
>
> Fix it by using judging desc_ptr cross the border or not after
> "desc_ptr += 4".
FWIW, I tested this change and I am still getting KASAN errors from ses.
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists