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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2cc5984b65beb6805f8d60ffd9627897b65b7700.camel@redhat.com>
Date: Thu, 29 Aug 2024 16:49:50 +0200
From: Philipp Stanner <pstanner@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>, Andy Shevchenko
	 <andy.shevchenko@...il.com>
Cc: Jens Axboe <axboe@...nel.dk>, Wu Hao <hao.wu@...el.com>, Tom Rix
 <trix@...hat.com>, Moritz Fischer <mdf@...nel.org>, Xu Yilun
 <yilun.xu@...el.com>,  Andy Shevchenko <andy@...nel.org>, Linus Walleij
 <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,  Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Bjorn Helgaas
 <bhelgaas@...gle.com>, Alvaro Karsz <alvaro.karsz@...id-run.com>, Jason
 Wang <jasowang@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Eugenio
 Pérez <eperezma@...hat.com>, Richard Cochran
 <richardcochran@...il.com>, Damien Le Moal <dlemoal@...nel.org>, Hannes
 Reinecke <hare@...e.de>, John Garry <john.g.garry@...cle.com>,
 linux-block@...r.kernel.org,  linux-kernel@...r.kernel.org,
 linux-fpga@...r.kernel.org,  linux-gpio@...r.kernel.org,
 netdev@...r.kernel.org, linux-pci@...r.kernel.org, 
 virtualization@...ts.linux.dev, stable@...r.kernel.org, Christophe JAILLET
 <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v5 6/7] vdpa: solidrun: Fix UB bug with devres

On Thu, 2024-08-29 at 10:41 -0400, Michael S. Tsirkin wrote:
> On Thu, Aug 29, 2024 at 05:26:39PM +0300, Andy Shevchenko wrote:
> > On Thu, Aug 29, 2024 at 5:23 PM Michael S. Tsirkin <mst@...hat.com>
> > wrote:
> > > 
> > > On Thu, Aug 29, 2024 at 04:16:25PM +0200, Philipp Stanner wrote:
> > > > In psnet_open_pf_bar() and snet_open_vf_bar() a string later
> > > > passed to
> > > > pcim_iomap_regions() is placed on the stack. Neither
> > > > pcim_iomap_regions() nor the functions it calls copy that
> > > > string.
> > > > 
> > > > Should the string later ever be used, this, consequently,
> > > > causes
> > > > undefined behavior since the stack frame will by then have
> > > > disappeared.
> > > > 
> > > > Fix the bug by allocating the strings on the heap through
> > > > devm_kasprintf().
> > > > 
> > > > Cc: stable@...r.kernel.org    # v6.3
> > > > Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.")
> > > > Reported-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > > > Closes:
> > > > https://lore.kernel.org/all/74e9109a-ac59-49e2-9b1d-d825c9c9f891@wanadoo.fr/
> > > > Suggested-by: Andy Shevchenko <andy@...nel.org>
> > > > Signed-off-by: Philipp Stanner <pstanner@...hat.com>
> > > 
> > > Post this separately, so I can apply?
> > 
> > Don't you use `b4`? With it it as simple as
> > 
> >   b4 am -P 6 $MSG_ID_OF_THIS_SERIES
> > 
> > -- 
> > With Best Regards,
> > Andy Shevchenko
> 
> I can do all kind of things, but if it's posted as part of a
> patchset,
> it is not clear to me this has been tested outside of the patchset.
> 

Separating it from the series would lead to merge conflicts, because
patch 7 depends on it.

If you're responsible for vdpa in general I could send patches 6 and 7
separately to you.

But number 7 depends on number 1, because pcim_iounmap_region() needs
to be public. So if patches 1-5 enter through a different tree than
yours, that could be a problem.


P.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ