All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-multimedia][PATCH 1/2] gst-shark: Upgrade to 0.7.3.1
@ 2022-02-04 17:27 Khem Raj
  2022-02-04 17:27 ` [meta-networking][PATCH 2/2] crda: Fix buffer overflow in sscanf Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2022-02-04 17:27 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Fix buffer overflow found with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-tracers-Fix-buffer-overflow.patch    | 33 +++++++++++++++++++
 .../gstreamer-1.0/gst-shark_git.bb            |  7 ++--
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark/0001-tracers-Fix-buffer-overflow.patch

diff --git a/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark/0001-tracers-Fix-buffer-overflow.patch b/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark/0001-tracers-Fix-buffer-overflow.patch
new file mode 100644
index 0000000000..1d85e51d6b
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark/0001-tracers-Fix-buffer-overflow.patch
@@ -0,0 +1,33 @@
+From d84807ec6d6f8511e4ec939a745d4d7bb35c3cfb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Feb 2022 09:22:48 -0800
+Subject: [PATCH] tracers: Fix buffer overflow
+
+Fixes
+| ../../../git/plugins/tracers/gstcpuusagecompute.c:106:9: error: 'fscanf' may overflow; destination buffer in argument 3 has size 8, but the corresponding specifier may require size 9 [-Werror,-Wfortify-sour
+ce]
+|         cpu_name, &user[0], &nice[0], &system[0], &idle[0], &iowait, &irq,
+|         ^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/tracers/gstcpuusagecompute.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/tracers/gstcpuusagecompute.c b/plugins/tracers/gstcpuusagecompute.c
+index 39255fb..00bae66 100644
+--- a/plugins/tracers/gstcpuusagecompute.c
++++ b/plugins/tracers/gstcpuusagecompute.c
+@@ -69,7 +69,7 @@ gst_cpu_usage_compute (GstCPUUsage * cpu_usage)
+   gint *idle;
+   gint *idle_aux;
+ 
+-  gchar cpu_name[CPU_NAME_MAX_SIZE];
++  gchar cpu_name[CPU_NAME_MAX_SIZE+1];
+   gint iowait;                  /* Time waiting for I/O to complete */
+   gint irq;                     /* Time servicing interrupts        */
+   gint softirq;                 /* Time servicing softirqs          */
+-- 
+2.35.1
+
diff --git a/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb b/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb
index d9863608a8..8c0a5c153f 100644
--- a/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb
+++ b/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb
@@ -10,14 +10,15 @@ DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad "
 
 SRCBRANCH ?= "master"
 
-PV = "0.7.2"
+PV = "0.7.3.1"
 
-SRCREV_base = "50e3dbd3b131de2a39d3917576e8f834631ec46b"
-SRCREV_common = "88e512ca7197a45c4114f7fa993108f23245bf50"
+SRCREV_base = "5413ef5475e5b70476c2480a75ca3746d91d4caf"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
 SRCREV_FORMAT = "base_common"
 SRC_URI = " \
     git://github.com/RidgeRun/gst-shark.git;protocol=https;branch=${SRCBRANCH};name=base \
     git://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;destsuffix=git/common;name=common;;branch=master \
+    file://0001-tracers-Fix-buffer-overflow.patch \
     "
 
 S = "${WORKDIR}/git"
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-networking][PATCH 2/2] crda: Fix buffer overflow in sscanf
  2022-02-04 17:27 [meta-multimedia][PATCH 1/2] gst-shark: Upgrade to 0.7.3.1 Khem Raj
@ 2022-02-04 17:27 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2022-02-04 17:27 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Fixes build with clang14

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-Make-alpha2-to-be-3-characters-long.patch | 31 +++++++++++++++++++
 .../recipes-connectivity/crda/crda_3.18.bb    |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/crda/crda/0001-Make-alpha2-to-be-3-characters-long.patch

diff --git a/meta-networking/recipes-connectivity/crda/crda/0001-Make-alpha2-to-be-3-characters-long.patch b/meta-networking/recipes-connectivity/crda/crda/0001-Make-alpha2-to-be-3-characters-long.patch
new file mode 100644
index 0000000000..f1d2cbc5a3
--- /dev/null
+++ b/meta-networking/recipes-connectivity/crda/crda/0001-Make-alpha2-to-be-3-characters-long.patch
@@ -0,0 +1,31 @@
+From 078e962d345fd0536fe7ba797485ee1a4159c032 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Feb 2022 09:18:30 -0800
+Subject: [PATCH] Make alpha2 to be 3 characters long
+
+Fixes buffer overflow
+reglib.c:969:9: error: 'sscanf' may overflow; destination buffer in argument 3 has size 2, but the corresponding specifier may require size 3 [-Werror,-Wfortify-source]
+                      alpha2,
+                      ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ reglib.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/reglib.c b/reglib.c
+index e00e9b8..8565a0b 100644
+--- a/reglib.c
++++ b/reglib.c
+@@ -958,7 +958,7 @@ reglib_parse_rules(FILE *fp, struct ieee80211_regdomain *trd)
+ static int reglib_parse_country_dfs(char *line, struct ieee80211_regdomain *rd)
+ {
+ 	char dfs_region_alpha[9];
+-	char alpha2[2];
++	char alpha2[3];
+ 	int hits;
+ 
+ 	memset(rd, 0, sizeof(*rd));
+-- 
+2.35.1
+
diff --git a/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta-networking/recipes-connectivity/crda/crda_3.18.bb
index f99dfd66f9..9abfd61cf2 100644
--- a/meta-networking/recipes-connectivity/crda/crda_3.18.bb
+++ b/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -15,6 +15,7 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
            file://use-target-word-size-instead-of-host-s.patch \
            file://fix-issues-when-USE_OPENSSL-1.patch \
            file://crda-4.14-python-3.patch \
+           file://0001-Make-alpha2-to-be-3-characters-long.patch \
 "
 SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
 SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-04 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 17:27 [meta-multimedia][PATCH 1/2] gst-shark: Upgrade to 0.7.3.1 Khem Raj
2022-02-04 17:27 ` [meta-networking][PATCH 2/2] crda: Fix buffer overflow in sscanf Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.