Target-devel archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Fullway Wang <fullwaywang@outlook.com>
Cc: bootc@bootc.net, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org, fullwaywang@tencent.com
Subject: Re: [PATCH] target: sbp: integer overflow and potential memory corruption
Date: Mon, 05 Feb 2024 17:02:12 -0500	[thread overview]
Message-ID: <yq1h6impo5p.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <PH7PR20MB59258C767EF853A54273B3A7BF712@PH7PR20MB5925.namprd20.prod.outlook.com> (Fullway Wang's message of "Thu, 18 Jan 2024 11:19:59 +0800")


Fullway,

> The code in sbp_make_tpg() is confusing because tpgt was limited
> to UINT_MAX but the datatype of tpg->tport_tpgt is actually u16.
> Correctly fix the data type problem to avoid integer overflow.
>
> This is similar to CVE-2015-4036 in the sense that sbp is a clone
> of vhost/scsi, and the bug was inherited but never fixed.

> +#define SBP_MAX_TARGET	256

Why 256?

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2024-02-05 22:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  3:19 [PATCH] target: sbp: integer overflow and potential memory corruption Fullway Wang
2024-02-05 22:02 ` Martin K. Petersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1h6impo5p.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=bootc@bootc.net \
    --cc=fullwaywang@outlook.com \
    --cc=fullwaywang@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).