mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: josef@toxicpanda.com, linan666@huaweicloud.com
Cc: linux-block@vger.kernel.org, nbd@other.debian.org,
	linux-kernel@vger.kernel.org, linan122@huawei.com,
	yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com,
	yangerkun@huawei.com
Subject: Re: [PATCH] nbd: pass nbd_sock to nbd_read_reply() instead of index
Date: Tue, 21 Nov 2023 07:42:35 -0700	[thread overview]
Message-ID: <170057775563.269185.521615863055260084.b4-ty@kernel.dk> (raw)
In-Reply-To: <20230911023308.3467802-1-linan666@huaweicloud.com>


On Mon, 11 Sep 2023 10:33:08 +0800, linan666@huaweicloud.com wrote:
> If a socket is processing ioctl 'NBD_SET_SOCK', config->socks might be
> krealloc in nbd_add_socket(), and a garbage request is received now, a UAF
> may occurs.
> 
>   T1
>   nbd_ioctl
>    __nbd_ioctl
>     nbd_add_socket
>      blk_mq_freeze_queue
> 				T2
>   				recv_work
>   				 nbd_read_reply
>   				  sock_xmit
>      krealloc config->socks
> 				   def config->socks
> 
> [...]

Applied, thanks!

[1/1] nbd: pass nbd_sock to nbd_read_reply() instead of index
      commit: 98c598afc22d4e43c2ad91860b65996d0c099a5d

Best regards,
-- 
Jens Axboe




      parent reply	other threads:[~2023-11-21 14:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11  2:33 linan666
2023-09-28  3:40 ` Li Nan
2023-09-28  4:05 ` Ming Lei
2023-09-28  6:03   ` Yu Kuai
2023-09-28  7:40     ` Ming Lei
2023-09-28  8:55       ` Yu Kuai
2023-09-28  8:57         ` Ming Lei
2023-09-28  9:06           ` Yu Kuai
2023-09-28  9:24             ` Ming Lei
2023-09-28  9:40               ` Yu Kuai
2023-10-30  2:07                 ` Yu Kuai
2023-10-30 12:42                   ` Ming Lei
2023-10-30 13:16                     ` Yu Kuai
2023-11-21  6:16                       ` Li Nan
2023-11-21 14:42 ` Jens Axboe [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=170057775563.269185.521615863055260084.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=houtao1@huawei.com \
    --cc=josef@toxicpanda.com \
    --cc=linan122@huawei.com \
    --cc=linan666@huaweicloud.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd@other.debian.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /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

all inboxes | Powered by JetHome®