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: <2025041421-fancied-thursday-97d8@gregkh>
Date: Mon, 14 Apr 2025 19:50:31 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Dave Stevenson <dave.stevenson@...pberrypi.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
	Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Umang Jain <umang.jain@...asonboard.com>,
	Stefan Wahren <wahrenst@....net>, linux-staging@...ts.linux.dev,
	linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: bcm2835-camera: Initialise dev in v4l2_dev

On Mon, Apr 14, 2025 at 06:41:47PM +0100, Dave Stevenson wrote:
> Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to
> vchiq_state") changed mmal_init to pass dev->v4l2_dev.dev to
> vchiq_mmal_init, however nothing iniitialised dev->v4l2_dev, so we got
> a NULL pointer dereference.
> 
> Set dev->v4l2_dev.dev during bcm2835_mmal_probe. The device pointer
> could be passed into v4l2_device_register to set it, however that also
> has other effects that would need additional changes.
> 
> Fixes: 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state")
> Signed-off-by: Dave Stevenson <dave.stevenson@...pberrypi.com>
> ---
> Noted as we switched to 6.12 that the driver would fail during probe
> with an invalid dereference if a camera module was actually configured
> for the legacy camera stack.
> https://github.com/raspberrypi/linux/issues/6753
> ---
>  drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index b839b50ac26a..fa7ea4ca4c36 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -1900,6 +1900,7 @@ static int bcm2835_mmal_probe(struct vchiq_device *device)
>  				__func__, ret);
>  			goto free_dev;
>  		}
> +		dev->v4l2_dev.dev = &device->dev;
>  
>  		/* setup v4l controls */
>  		ret = bcm2835_mmal_init_controls(dev, &dev->ctrl_handler);
> 
> ---
> base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
> change-id: 20250410-staging-bcm2835-v4l2-fix-b8dbd933c23b
> 
> Best regards,
> -- 
> Dave Stevenson <dave.stevenson@...pberrypi.com>
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You have marked a patch with a "Fixes:" tag for a commit that is in an
  older released kernel, yet you do not have a cc: stable line in the
  signed-off-by area at all, which means that the patch will not be
  applied to any older kernel releases.  To properly fix this, please
  follow the documented rules in the
  Documentation/process/stable-kernel-rules.rst file for how to resolve
  this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ