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