Bug 1213126 (CVE-2023-37329)

Summary: VUL-0: CVE-2023-37329: gstreamer-plugins-bad: GStreamer PGS blu-ray subtitle decoder Heap-based Buffer Overflow Remote Code Execution Vulnerability
Product: [Novell Products] SUSE Security Incidents Reporter: Gianluca Gabrielli <gianluca.gabrielli>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Major    
Priority: P3 - Medium CC: alarrosa, security-team, stoyan.manolov
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/371513/
Whiteboard: CVSSv3.1:SUSE:CVE-2023-37329:7.8:(AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Gianluca Gabrielli 2023-07-07 09:02:28 UTC
This vulnerability allows remote attackers to execute arbitrary code on affected
installations of GStreamer. Interaction with this library is required to exploit
this vulnerability but attack vectors may vary depending on the implementation.

The specific flaw exists within the parsing of SRT subtitle files. The issue
results from the lack of proper validation of the length of user-supplied data
prior to copying it to a heap-based buffer. An attacker can leverage this
vulnerability to execute code in the context of the current process.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-37329
https://www.zerodayinitiative.com/advisories/ZDI-23-902/
Comment 1 Gianluca Gabrielli 2023-07-07 09:08:14 UTC
Affected packages:

- SUSE:SLE-15-SP5:Update/gstreamer-plugins-base
- SUSE:ALP:Source:Standard:1.0/gstreamer-plugins-base
- SUSE:SLE-15-SP2:Update/gstreamer-plugins-base
- SUSE:SLE-15-SP4:Update/gstreamer-plugins-base
- SUSE:SLE-15:Update/gstreamer-plugins-base
- openSUSE:Factory/gstreamer-plugins-base
- SUSE:SLE-12-SP2:Update/gstreamer-plugins-base

The upstream patch [0] won't easily apply to `SUSE:SLE-12-SP2:Update/gstreamer-plugins-base`, hence some some adjustments are required. I believe it's affected too, as can be seen at gst/subparse/gstsubparse.c:760

```
 750   │ subrip_fix_up_markup (gchar ** p_txt)
 751   │ {
 752   │   gchar *cur, *next_tag;
 753   │   gchar open_tags[32];
 754   │   guint num_open_tags = 0;
 755   │
 756   │   g_assert (*p_txt != NULL);
 757   │
 758   │   cur = *p_txt;
 759   │   while (*cur != '\0') {
 760   │     next_tag = strchr (cur, '<');
 761   │     if (next_tag == NULL)
 762   │       break;
 763   │     ++next_tag;
 764   │     switch (*next_tag) {
```

--
[0] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4895.patch
Comment 7 Antonio Larrosa 2023-08-03 15:07:50 UTC
Fixed the title to match CVE-2023-37329 according to the upstream security advisory at https://gstreamer.freedesktop.org/security/sa-2023-0003.html
Comment 8 Maintenance Automation 2023-08-07 20:32:02 UTC
SUSE-SU-2023:3220-1: An update that solves one vulnerability can now be installed.

Category: security (important)
Bug References: 1213126
CVE References: CVE-2023-37329
Sources used:
Basesystem Module 15-SP4 (src): gstreamer-plugins-bad-1.20.1-150400.3.3.1
Desktop Applications Module 15-SP4 (src): gstreamer-plugins-bad-1.20.1-150400.3.3.1
SUSE Package Hub 15 15-SP4 (src): gstreamer-plugins-bad-1.20.1-150400.3.3.1
openSUSE Leap 15.4 (src): gstreamer-plugins-bad-1.20.1-150400.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 9 Maintenance Automation 2023-08-08 20:30:05 UTC
SUSE-SU-2023:3249-1: An update that solves one vulnerability can now be installed.

Category: security (important)
Bug References: 1213126
CVE References: CVE-2023-37329
Sources used:
openSUSE Leap 15.5 (src): gstreamer-plugins-bad-1.22.0-150500.3.3.1
Basesystem Module 15-SP5 (src): gstreamer-plugins-bad-1.22.0-150500.3.3.1
Desktop Applications Module 15-SP5 (src): gstreamer-plugins-bad-1.22.0-150500.3.3.1
SUSE Package Hub 15 15-SP5 (src): gstreamer-plugins-bad-1.22.0-150500.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Maintenance Automation 2023-08-08 20:30:41 UTC
SUSE-SU-2023:3235-1: An update that solves one vulnerability can now be installed.

Category: security (important)
Bug References: 1213126
CVE References: CVE-2023-37329
Sources used:
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): gstreamer-plugins-bad-1.16.3-150200.4.7.2
SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): gstreamer-plugins-bad-1.16.3-150200.4.7.2
SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): gstreamer-plugins-bad-1.16.3-150200.4.7.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Maintenance Automation 2023-08-10 17:09:51 UTC
SUSE-SU-2023:3267-1: An update that solves one vulnerability can now be installed.

Category: security (important)
Bug References: 1213126
CVE References: CVE-2023-37329
Sources used:
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Manager Proxy 4.2 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Manager Retail Branch Server 4.2 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Manager Server 4.2 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2
SUSE Enterprise Storage 7.1 (src): gstreamer-plugins-bad-1.16.3-150300.9.6.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Antonio Larrosa 2023-08-30 10:13:24 UTC
In SLE-12 the dvdspu directory is removed before building the package so SLE-12 isn't affected by CVE-2023-37329
Comment 18 Maintenance Automation 2023-09-27 12:30:01 UTC
SUSE-SU-2023:3802-1: An update that solves one vulnerability can now be installed.

Category: security (important)
Bug References: 1213126
CVE References: CVE-2023-37329
Sources used:
SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): gstreamer-plugins-bad-1.12.5-150000.3.9.1
SUSE CaaS Platform 4.0 (src): gstreamer-plugins-bad-1.12.5-150000.3.9.1
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): gstreamer-plugins-bad-1.12.5-150000.3.9.1
SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): gstreamer-plugins-bad-1.12.5-150000.3.9.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 19 Marcus Meissner 2023-11-26 14:05:59 UTC
openSUSE-SU-2023:0379-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1213126
CVE References: CVE-2023-37329
JIRA References: 
Sources used:
openSUSE Leap 15.5 (src):    gstreamer-plugins-bad-1.22.0-lp155.3.4.1
openSUSE Leap 15.4 (src):    gstreamer-plugins-bad-1.20.1-lp154.2.4.1
Comment 21 Maintenance Automation 2023-12-25 12:30:02 UTC
SUSE-SU-2023:4971-1: An update that solves two vulnerabilities can now be installed.

Category: security (important)
Bug References: 1213126, 1215792
CVE References: CVE-2023-37329, CVE-2023-40475
Sources used:
openSUSE Leap 15.3 (src): gstreamer-plugins-bad-1.16.3-150300.9.15.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.15.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.15.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.15.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): gstreamer-plugins-bad-1.16.3-150300.9.15.1
SUSE Enterprise Storage 7.1 (src): gstreamer-plugins-bad-1.16.3-150300.9.15.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.