CVE-2024-50175

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-50175
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50175.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-50175
Downstream
Related
Published
2024-11-08T05:23:57Z
Modified
2025-10-15T18:07:59.691011Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
media: qcom: camss: Remove use_count guard in stop_streaming
Details

In the Linux kernel, the following vulnerability has been resolved:

media: qcom: camss: Remove usecount guard in stopstreaming

The use_count check was introduced so that multiple concurrent Raw Data Interfaces RDIs could be driven by different virtual channels VCs on the CSIPHY input driving the video pipeline.

This is an invalid use of usecount though as usecount pertains to the number of times a video entity has been opened by user-space not the number of active streams.

If usecount and stream-on count don't agree then stopstreaming() will break as is currently the case and has become apparent when using CAMSS with libcamera's released softisp 0.3.

The use of use_count like this is a bit hacky and right now breaks regular usage of CAMSS for a single stream case. Stopping qcam results in the splat below, and then it cannot be started again and any attempts to do so fails with -EBUSY.

[ 1265.509831] WARNING: CPU: 5 PID: 919 at drivers/media/common/videobuf2/videobuf2-core.c:2183 _vb2queuecancel+0x230/0x2c8 [videobuf2common] ... [ 1265.510630] Call trace: [ 1265.510636] _vb2queuecancel+0x230/0x2c8 [videobuf2common] [ 1265.510648] vb2corestreamoff+0x24/0xcc [videobuf2common] [ 1265.510660] vb2ioctlstreamoff+0x5c/0xa8 [videobuf2v4l2] [ 1265.510673] v4lstreamoff+0x24/0x30 [videodev] [ 1265.510707] _videodoioctl+0x190/0x3f4 [videodev] [ 1265.510732] videousercopy+0x304/0x8c4 [videodev] [ 1265.510757] videoioctl2+0x18/0x34 [videodev] [ 1265.510782] v4l2ioctl+0x40/0x60 [videodev] ... [ 1265.510944] videobuf2common: driver bug: stopstreaming operation is leaving buffer 0 in active state [ 1265.511175] videobuf2common: driver bug: stopstreaming operation is leaving buffer 1 in active state [ 1265.511398] videobuf2common: driver bug: stop_streaming operation is leaving buffer 2 in active st

One CAMSS specific way to handle multiple VCs on the same RDI might be:

  • Reference count each pipeline enable for CSIPHY, CSID, VFE and RDIx.
  • The video buffers are already associated with msmvfeNrdiX so release video buffers when told to do so by stop_streaming.
  • Only release the power-domains for the CSIPHY, CSID and VFE when their internal refcounts drop.

Either way refusing to release video buffers based on use_count is erroneous and should be reverted. The silicon enabling code for selecting VCs is perfectly fine. Its a "known missing feature" that concurrent VCs won't work with CAMSS right now.

Initial testing with this code didn't show an error but, SoftISP and "real" usage with Google Hangouts breaks the upstream code pretty quickly, we need to do a partial revert and take another pass at VCs.

This commit partially reverts commit 89013969e232 ("media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels")

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
89013969e23247661f0514c77f26d60fa083216c
Fixed
c2218a82f795dc3d0b6210bcaa3d9c5ca736fcd9
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
89013969e23247661f0514c77f26d60fa083216c
Fixed
a975db8aea152f9907aa53a7f517e557ccb40da3
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
89013969e23247661f0514c77f26d60fa083216c
Fixed
d7d4dde3decef1b5aa1f5c390147f79aae412dee
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
89013969e23247661f0514c77f26d60fa083216c
Fixed
25f18cb1b673220b76a86ebef8e7fb79bd303b27

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.10.1
v6.10.10
v6.10.11
v6.10.12
v6.10.13
v6.10.2
v6.10.3
v6.10.4
v6.10.5
v6.10.6
v6.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events
Introduced
6.7.0
Fixed
6.10.14
Type
ECOSYSTEM
Events
Introduced
6.11.0
Fixed
6.11.3