[prev in list] [next in list] [prev in thread] [next in thread]
List: openvas-cvs
Subject: [Openvas-commits] r24264 - in branches/gsa-6.0: . src
From: scm-commit () wald ! intevation ! org
Date: 2016-01-31 12:47:41
Message-ID: 20160131124741.AEF619A194C1 () wald ! intevation ! org
[Download RAW message or body]
Author: mattm
Date: 2016-01-31 13:47:41 +0100 (Sun, 31 Jan 2016)
New Revision: 24264
Modified:
branches/gsa-6.0/ChangeLog
branches/gsa-6.0/src/gsad.c
Log:
Backport r24262.
* src/gsad.c (request_handler): Close connection if "url" is not valid
UTF-8. This prevents Glib from segfaulting when printing the URL to the
login page XML, which could be used to bring GSA down.
Modified: branches/gsa-6.0/ChangeLog
===================================================================
--- branches/gsa-6.0/ChangeLog 2016-01-31 12:44:30 UTC (rev 24263)
+++ branches/gsa-6.0/ChangeLog 2016-01-31 12:47:41 UTC (rev 24264)
@@ -1,5 +1,13 @@
2016-01-31 Matthew Mundell <matthew.mundell@greenbone.net>
+ Backport r24262.
+
+ * src/gsad.c (request_handler): Close connection if "url" is not valid
+ UTF-8. This prevents Glib from segfaulting when printing the URL to the
+ login page XML, which could be used to bring GSA down.
+
+2016-01-31 Matthew Mundell <matthew.mundell@greenbone.net>
+
Backport r24261.
* src/gsad.c (request_handler): Check that params has been setup before
Modified: branches/gsa-6.0/src/gsad.c
===================================================================
--- branches/gsa-6.0/src/gsad.c 2016-01-31 12:44:30 UTC (rev 24263)
+++ branches/gsa-6.0/src/gsad.c 2016-01-31 12:47:41 UTC (rev 24264)
@@ -3718,6 +3718,10 @@
if (url && (url[0] == '/') && (url[1] == '/'))
return MHD_NO;
+ /* Many Glib functions require valid UTF-8. */
+ if (url && (g_utf8_validate (url, -1, NULL) == FALSE))
+ return MHD_NO;
+
/* Only accept GET and POST methods and send ERROR_PAGE in other cases. */
if (strcmp (method, "GET") && strcmp (method, "POST"))
{
_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic