mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
gstreamer1.0-plugins-bad: fix CVE-2023-40476
gst-plugins-bad: h265parser: Fix possible overflow using max_sub_layers_minus1 (From OE-Core rev: 2abcf03fbe343596de38113c655028c157763245) Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
200596b5ad
commit
fe7e47368e
@@ -0,0 +1,44 @@
|
||||
From 1b51467ea640bcc73c97f3186350d72cbfba5cb4 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
||||
Date: Wed, 9 Aug 2023 12:49:19 -0400
|
||||
Subject: [PATCH] h265parser: Fix possible overflow using max_sub_layers_minus1
|
||||
|
||||
This fixes a possible overflow that can be triggered by an invalid value of
|
||||
max_sub_layers_minus1 being set in the bitstream. The bitstream uses 3 bits,
|
||||
but the allowed range is 0 to 6 only.
|
||||
|
||||
Fixes ZDI-CAN-21768, CVE-2023-40476
|
||||
|
||||
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2895
|
||||
|
||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5364>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/ff91a3d8d6f7e2412c44663bf30fad5c7fdbc9d9]
|
||||
CVE: CVE-2023-40476
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
|
||||
---
|
||||
gst-libs/gst/codecparsers/gsth265parser.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
|
||||
index a4e7549..3db1c38 100644
|
||||
--- a/gst-libs/gst/codecparsers/gsth265parser.c
|
||||
+++ b/gst-libs/gst/codecparsers/gsth265parser.c
|
||||
@@ -1670,6 +1670,7 @@ gst_h265_parse_vps (GstH265NalUnit * nalu, GstH265VPS * vps)
|
||||
|
||||
READ_UINT8 (&nr, vps->max_layers_minus1, 6);
|
||||
READ_UINT8 (&nr, vps->max_sub_layers_minus1, 3);
|
||||
+ CHECK_ALLOWED (vps->max_sub_layers_minus1, 0, 6);
|
||||
READ_UINT8 (&nr, vps->temporal_id_nesting_flag, 1);
|
||||
|
||||
/* skip reserved_0xffff_16bits */
|
||||
@@ -1849,6 +1850,7 @@ gst_h265_parse_sps (GstH265Parser * parser, GstH265NalUnit * nalu,
|
||||
sps->vps = vps;
|
||||
|
||||
READ_UINT8 (&nr, sps->max_sub_layers_minus1, 3);
|
||||
+ CHECK_ALLOWED (sps->max_sub_layers_minus1, 0, 6);
|
||||
READ_UINT8 (&nr, sps->temporal_id_nesting_flag, 1);
|
||||
|
||||
if (!gst_h265_parse_profile_tier_level (&sps->profile_tier_level, &nr,
|
||||
@@ -12,6 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad
|
||||
file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
|
||||
file://CVE-2023-40474.patch \
|
||||
file://CVE-2023-40475.patch \
|
||||
file://CVE-2023-40476.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "87251beebfd1325e5118cc67774061f6e8971761ca65a9e5957919610080d195"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user