baab13
From ab4351808352e00d72a7fd948e3e923d08e1a0fc Mon Sep 17 00:00:00 2001
baab13
From: Jakub Filak <jfilak@redhat.com>
baab13
Date: Wed, 30 Sep 2015 12:19:48 +0200
baab13
Subject: [PATCH] ccpp: ignore crashes of ABRT binaries if DebugLevel == 0
baab13
baab13
Prior this commit abrt-hook-ccpp was saved core file of any
baab13
crashed process executing program whose name starts with "abrt" in
baab13
DUMP_LOCATION.
baab13
baab13
ABRT does not check size constraints of these core files, so the files
baab13
could consume an uncontrolled amount of disk space.
baab13
baab13
Related to CVE-2015-5287
baab13
Related: #1262252
baab13
baab13
Signed-off-by: Jakub Filak <jfilak@redhat.com>
baab13
---
baab13
 src/hooks/abrt-hook-ccpp.c | 7 +++++++
baab13
 1 file changed, 7 insertions(+)
baab13
baab13
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
baab13
index 12b3f118..7a19cc2 100644
baab13
--- a/src/hooks/abrt-hook-ccpp.c
baab13
+++ b/src/hooks/abrt-hook-ccpp.c
baab13
@@ -842,6 +842,13 @@ int main(int argc, char** argv)
baab13
     const char *last_slash = strrchr(executable, '/');
baab13
     if (last_slash && strncmp(++last_slash, "abrt", 4) == 0)
baab13
     {
baab13
+        if (g_settings_debug_level == 0)
baab13
+        {
baab13
+            log_warning("Ignoring crash of %s (SIG%s).",
baab13
+                        executable, signame ? signame : signal_str);
baab13
+            goto finito;
baab13
+        }
baab13
+
baab13
         /* If abrtd/abrt-foo crashes, we don't want to create a _directory_,
baab13
          * since that can make new copy of abrtd to process it,
baab13
          * and maybe crash again...
baab13
-- 
baab13
1.8.3.1
baab13