From e07a0a005d67df4b40603c0c17d6b9cafc12c28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sabri=20=C3=9Cnal?= Date: Wed, 25 Oct 2023 13:40:19 +0000 Subject: [PATCH 1/3] Update Turkish translation --- po/tr.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/po/tr.po b/po/tr.po index 2d1de2e9..0dbddbe1 100644 --- a/po/tr.po +++ b/po/tr.po @@ -12,16 +12,16 @@ msgid "" msgstr "" "Project-Id-Version: libgtop\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgtop/issues\n" -"POT-Creation-Date: 2023-01-25 20:47+0000\n" -"PO-Revision-Date: 2017-09-05 07:33+0300\n" -"Last-Translator: Emin Tufan Çetin \n" +"POT-Creation-Date: 2023-08-08 10:47+0000\n" +"PO-Revision-Date: 2023-10-24 02:11+0300\n" +"Last-Translator: Sabri Ünal \n" "Language-Team: Türkçe \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Gtranslator 2.91.7\n" +"X-Generator: Poedit 3.4\n" #: lib/read.c:49 #, c-format @@ -106,7 +106,7 @@ msgstr "Öldür" #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 msgid "Bus error" -msgstr "Veriyolu hatası" +msgstr "Veri yolu hatası" #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 msgid "Segmentation violation" From 35972c6a3d9e3b09d5e53ebac818c231107bb0ee Mon Sep 17 00:00:00 2001 From: Addison Crump Date: Fri, 2 Feb 2024 11:43:11 +0100 Subject: [PATCH 2/3] fix some bounds checks --- src/daemon/main.c | 22 ++++++++++++++-------- src/daemon/slave.c | 16 ++++++++++------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/daemon/main.c b/src/daemon/main.c index 47a94586..58a61412 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -61,25 +61,31 @@ handle_parent_connection (int s) "Parent (%d) received command %lu from client.", getpid (), cmnd->command); - if (cmnd->data_size >= BUFSIZ) { - syslog_message (LOG_WARNING, - "Client sent %lu bytes, but buffer is %lu", - cmnd->data_size, (unsigned long)BUFSIZ); - return; - } - memset (resp, 0, sizeof (glibtop_response)); memset (parameter, 0, sizeof (parameter)); if (cmnd->data_size) { + if (cmnd->data_size >= BUFSIZ) { + syslog_message (LOG_WARNING, + "Client sent %lu bytes, but buffer is %lu", + cmnd->data_size, (unsigned long)BUFSIZ); + return; + } + if (enable_debug) syslog_message (LOG_DEBUG, "Client has %lu bytes of data.", cmnd->data_size); do_read (s, parameter, cmnd->data_size); - } else if (cmnd->size) { + if (cmnd->size >= BUFSIZ) { + syslog_message (LOG_WARNING, + "Client sent %lu bytes, but buffer is %lu", + cmnd->size, (unsigned long)BUFSIZ); + return; + } + memcpy (parameter, cmnd->parameter, cmnd->size); } diff --git a/src/daemon/slave.c b/src/daemon/slave.c index 80b2b5ab..25bd19e7 100644 --- a/src/daemon/slave.c +++ b/src/daemon/slave.c @@ -44,22 +44,26 @@ handle_slave_connection (int input, int output) glibtop_debug ("Slave %d received command " "%lu from client.", getpid (), cmnd->command); - if (cmnd->data_size >= BUFSIZ) - glibtop_error ("Client sent %lu bytes, " - "but buffer is %lu", - cmnd->size, (unsigned long)BUFSIZ); - memset (resp, 0, sizeof (glibtop_response)); memset (parameter, 0, sizeof (parameter)); if (cmnd->data_size) { + if (cmnd->data_size >= BUFSIZ) + glibtop_error ("Client sent %lu bytes, " + "but buffer is %lu", + cmnd->data_size, (unsigned long)BUFSIZ); + glibtop_debug ("Client has %lu bytes of data.", cmnd->data_size); do_read (input, parameter, cmnd->data_size); - } else if (cmnd->size) { + if (cmnd->size >= BUFSIZ) + glibtop_error ("Client sent %lu bytes, " + "but buffer is %lu", + cmnd->size, (unsigned long)BUFSIZ); + memcpy (parameter, cmnd->parameter, cmnd->size); } From 526a51698173535312f6cab1408ac9a225063c9d Mon Sep 17 00:00:00 2001 From: Robert Roth Date: Fri, 16 Feb 2024 19:49:25 +0200 Subject: [PATCH 3/3] Prepared release 2.41.3 --- NEWS | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 90b54dab..793c7c45 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +16 February 2024: Overview of changes in 2.41.3 +================================================ + +* Fixed daemon buffer overflow #72 +* Updated translations + 15 October 2023: Overview of changes in 2.41.2 ================================================ diff --git a/configure.ac b/configure.ac index 6204a5e2..db2a48bb 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl m4_define([libgtop_major_version], [2]) m4_define([libgtop_minor_version], [41]) -m4_define([libgtop_micro_version], [2]) +m4_define([libgtop_micro_version], [3]) m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version]) dnl increment if the interface has additions, changes, removals.