Re: [PATCH v5.15.y 3/3] rpmsg: Fix kfree() of static memory on setting driver_override

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

 



On Mon, 23 Oct 2023, Greg Kroah-Hartman wrote:

> On Wed, Oct 18, 2023 at 01:04:34PM +0100, Lee Jones wrote:
> > From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> > 
> > commit 42cd402b8fd4672b692400fe5f9eecd55d2794ac upstream.
> > 
> > The driver_override field from platform driver should not be initialized
> > from static memory (string literal) because the core later kfree() it,
> > for example when driver_override is set via sysfs.
> > 
> > Use dedicated helper to set driver_override properly.
> > 
> > Fixes: 950a7388f02b ("rpmsg: Turn name service into a stand alone driver")
> > Fixes: c0cdc19f84a4 ("rpmsg: Driver for user space endpoint interface")
> > Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> > Link: https://lore.kernel.org/r/20220419113435.246203-13-krzysztof.kozlowski@xxxxxxxxxx
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> > ---
> >  drivers/rpmsg/rpmsg_internal.h | 13 +++++++++++--
> >  include/linux/rpmsg.h          |  6 ++++--
> >  2 files changed, 15 insertions(+), 4 deletions(-)
> 
> Any specific reason why you missed the fixes for this commit as well?
> Turned out to need some more things after this :(

No reason not to.  I didn't notice them.

> Why are these needed at all for the stable kernels anyway?  It's good to
> have in the tree, but who is using manual overrides for the rpmsg driver
> in the first place?

UAF.

> I'm going to drop all of these from the stable queues now and wait for a
> fixed up set of patches with a good reason to justify their existence in
> the stable trees.

As per our SOP, I'd like to avoid spelling it out.

Ping me for details if you really want to know.

Which patches have you dropped?  Just these 3 or all branches?

-- 
Lee Jones [李琼斯]



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux