Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Jul 24, 2025

Backport 366c64e~2..366c64e from #92320.

Fixes #97269

josuah added 2 commits July 24, 2025 15:59
Some OSes like MacOS use shorter UVC 1.1 probe/commit messages even when
UVC 1.5 is supported, without bUsage, bBitDepthLuma, bmSettings,
bMaxNumberOfRefFramesPlus1, bmRateControlModes bmLayoutPerStream.
Accept messages of arbitrary size to safely be processed, ignoring all
missing fields, improving standard compliance.

Signed-off-by: Josuah Demangeon <[email protected]>
(cherry picked from commit ed9327d)
Due to the alignment and granularity requirements of memory allocation,
setup->wLength is shorter than the allocated buffer size.
This lead to responses larger than what the host requested, which it
rejected. Fix it by using the minimum between the allocated size, the
struct size, and the wLength requested.

Signed-off-by: Josuah Demangeon <[email protected]>
(cherry picked from commit 366c64e)
@github-actions github-actions bot added the Backport Backport PR and backport failure issues label Jul 24, 2025
@github-project-automation github-project-automation bot moved this to To do in Backports Jul 24, 2025
@dkalowsk dkalowsk added this to the v4.2.1 milestone Jul 27, 2025
@dkalowsk
Copy link
Contributor

@josuah this is set for a backport but the commit messages read (to me) as more of a new feature than a bug fix. Is there an issue for for this?

@josuah
Copy link
Contributor

josuah commented Jul 27, 2025

the commit messages read (to me) as more of a new feature than a bug fix.

The message could be read as "usb: uvc: allow the host to use short probe/commit messages [as required by the standard]".

So it is not a "bug" in the sense of a crash or a security issue, only a non-compliance with the standard which caused problems with some OS.

Is there an issue for for this?

No. I am away this week but will try to add one tonight to help.

@github-project-automation github-project-automation bot moved this from To do to Done in Backports Jul 28, 2025
@github-project-automation github-project-automation bot moved this from Done to Needs more info in Backports Jul 28, 2025
@zephyrbot zephyrbot added the area: USB Universal Serial Bus label Jul 28, 2025
@sonarqubecloud
Copy link

@henrikbrixandersen henrikbrixandersen moved this from Needs more info to Needs a bug report in Backports Aug 4, 2025
@github-actions
Copy link
Author

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Sep 28, 2025
@jfischer-no jfischer-no requested a review from josuah September 30, 2025 10:33
@github-actions github-actions bot removed the Stale label Oct 1, 2025
@dkalowsk
Copy link
Contributor

dkalowsk commented Oct 6, 2025

the commit messages read (to me) as more of a new feature than a bug fix.

The message could be read as "usb: uvc: allow the host to use short probe/commit messages [as required by the standard]".

So it is not a "bug" in the sense of a crash or a security issue, only a non-compliance with the standard which caused problems with some OS.

Is there an issue for for this?

No. I am away this week but will try to add one tonight to help.

@josuah still needs an issue. We're prepping a 4.2.1 release

@josuah
Copy link
Contributor

josuah commented Oct 9, 2025

@dkalowsk sorry for keeping such a small task stuck for so long...
I added #97269 and let me know if this needed to be done differently.

@dkalowsk dkalowsk closed this Oct 9, 2025
@github-project-automation github-project-automation bot moved this from Needs a bug report to Done in Backports Oct 9, 2025
@dkalowsk dkalowsk reopened this Oct 9, 2025
@github-project-automation github-project-automation bot moved this from Done to Needs more info in Backports Oct 9, 2025
@dkalowsk
Copy link
Contributor

dkalowsk commented Oct 9, 2025

@dkalowsk sorry for keeping such a small task stuck for so long... I added #97269 and let me know if this needed to be done differently.

no problem. It missed the 4.2.1 release but now can be in for the next one. also fixed the description to fix the CI check

@dkalowsk dkalowsk moved this from Needs more info to Ready in Backports Oct 9, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2025

@josuah
Copy link
Contributor

josuah commented Oct 9, 2025

Thanks for your help.

@dkalowsk dkalowsk merged commit 2c317b0 into v4.2-branch Oct 9, 2025
57 of 59 checks passed
@dkalowsk dkalowsk deleted the backport-92320-to-v4.2-branch branch October 9, 2025 21:47
@github-project-automation github-project-automation bot moved this from Ready to Done in Backports Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: USB Universal Serial Bus Backport Backport PR and backport failure issues

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants