Re: [PATCHv4 3/5] ublk: zc register/unregister bvec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 20, 2025 at 11:11:59AM +0000, Pavel Begunkov wrote:
> On 2/18/25 22:42, Keith Busch wrote:
> > +static int ublk_unregister_io_buf(struct io_uring_cmd *cmd,
> > +				  struct ublk_queue *ubq, int tag,
> > +				  const struct ublksrv_io_cmd *ub_cmd,
> > +				  unsigned int issue_flags)
> > +{
> > +	struct io_ring_ctx *ctx = cmd_to_io_kiocb(cmd)->ctx;
> > +	struct ublk_device *ub = cmd->file->private_data;
> > +	int index = (int)ub_cmd->addr;
> > +	struct ublk_rq_data *data;
> > +	struct request *req;
> > +
> > +	if (!ub)
> > +		return -EPERM;
> > +
> > +	req = blk_mq_tag_to_rq(ub->tag_set.tags[ubq->q_id], tag);
> 
> Shouldn't there some speculation sanitisation for the tag as well?
> Looks like a user passed value directly indexing an array.

There are no other array speculation defenses here, so looks like a
pre-existing issue. I'll send something to address that separate from
this series.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux