mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-05 17:25:30 +00:00
yasm v1.3.0 was discovered to contain a memory leak via the function
yasm_intnum_copy at /libyasm/intnum.c.
References:
https://nvd.nist.gov/vuln/detail/CVE-2023-31975
https://github.com/yasm/yasm/issues/210
Upstream patches:
b2cc5a1693
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
30 lines
944 B
Diff
30 lines
944 B
Diff
From b2cc5a1693b17ac415df76d0795b15994c106441 Mon Sep 17 00:00:00 2001
|
|
From: Katsuhiko Gondow <gondow@cs.titech.ac.jp>
|
|
Date: Tue, 13 Jun 2023 05:00:47 +0900
|
|
Subject: [PATCH] Fix memory leak in bin-objfmt (#231)
|
|
|
|
Upstream-Status: Backport [https://github.com/yasm/yasm/commit/b2cc5a1693b17ac415df76d0795b15994c106441]
|
|
|
|
CVE: CVE-2023-31975
|
|
---
|
|
modules/objfmts/bin/bin-objfmt.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c
|
|
index 18026750..a38c3422 100644
|
|
--- a/modules/objfmts/bin/bin-objfmt.c
|
|
+++ b/modules/objfmts/bin/bin-objfmt.c
|
|
@@ -1680,6 +1680,10 @@ static void
|
|
bin_section_data_destroy(void *data)
|
|
{
|
|
bin_section_data *bsd = (bin_section_data *)data;
|
|
+ if (bsd->align)
|
|
+ yasm_xfree(bsd->align);
|
|
+ if (bsd->valign)
|
|
+ yasm_xfree(bsd->valign);
|
|
if (bsd->start)
|
|
yasm_expr_destroy(bsd->start);
|
|
if (bsd->vstart)
|
|
--
|
|
2.40.0
|