Skip to content

fix(h264,homekit): add bounds guards against malformed device data#2193

Open
MechanicalCoderX wants to merge 1 commit intoAlexxIT:masterfrom
MechanicalCoderX:fix/h264-homekit-guards
Open

fix(h264,homekit): add bounds guards against malformed device data#2193
MechanicalCoderX wants to merge 1 commit intoAlexxIT:masterfrom
MechanicalCoderX:fix/h264-homekit-guards

Conversation

@MechanicalCoderX
Copy link
Copy Markdown

h264 GetFmtpLine: check len(avc) >= 8 and size <= len(avc) before accessing avc[5:8] for the SPS profile bytes. A truncated SPS NALU from a misbehaving device caused an index-out-of-range panic.

homekit videoToMedia: clamp profileID and level to the bounds of the videoProfiles/videoLevels tables before indexing them. A non-compliant HomeKit device advertising an out-of-range profile or level value caused an index-out-of-range panic.

h264 GetFmtpLine: check len(avc) >= 8 and size <= len(avc) before
accessing avc[5:8] for the SPS profile bytes.  A truncated SPS NALU
from a misbehaving device caused an index-out-of-range panic.

homekit videoToMedia: clamp profileID and level to the bounds of the
videoProfiles/videoLevels tables before indexing them.  A non-compliant
HomeKit device advertising an out-of-range profile or level value caused
an index-out-of-range panic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant