Bug 18021 - cacti new security issues CVE-2016-3172 and CVE-2016-3659
Summary: cacti new security issues CVE-2016-3172 and CVE-2016-3659
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL: http://lwn.net/Vulnerabilities/687864/
Whiteboard: has_procedure advisory MGA5-32-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-03-16 12:28 CET by David Walser
Modified: 2016-05-18 22:15 CEST (History)
6 users (show)

See Also:
Source RPM: cacti-0.8.8f-1.3.mga5.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2016-03-16 12:28:36 CET
A CVE has been assigned for a security issue reported upstream for Cacti:
http://openwall.com/lists/oss-security/2016/03/15/11

The previous message in the thread contains a suggested fix:
http://openwall.com/lists/oss-security/2016/03/15/8
David Walser 2016-03-16 12:28:43 CET

Whiteboard: (none) => MGA5TOO

Marja Van Waes 2016-03-25 09:02:10 CET

CC: (none) => marja11
Assignee: bugsquad => luis.daniel.lucio

Comment 1 David GEIGER 2016-05-03 17:34:50 CEST
Done! both cauldron and mga5

CC: (none) => geiger.david68210

Comment 2 David Walser 2016-05-03 18:26:54 CEST
Procedure in bug 13930

Advisory:
========================

Updated cacti package fixes security vulnerability:

SQL injection vulnerability in cacti in cacti/tree.php (CVE-2016-3172).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3172
http://openwall.com/lists/oss-security/2016/03/15/11
========================

Updated packages in core/updates_testing:
========================
cacti-0.8.8f-1.4.mga5

from cacti-0.8.8f-1.4.mga5.src.rpm

Version: Cauldron => 5
Assignee: luis.daniel.lucio => qa-bugs
Whiteboard: MGA5TOO => has_procedure

Comment 3 Len Lawrence 2016-05-04 22:02:58 CEST
Trying this on x86_64  before updating but need help already.

cacti had already been installed for a previous test.  Invented another dummy user
and password.

$ mysql -p --user=root mysql
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 23574
Server version.......

MariaDB [mysql]> grant all on cacti.* to cactus@localhost identified by 'muttermutter';
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> quit;

crontab already had the modification needed; real user given.
*/5 * * * * lcl php /usr/share/cacti/poller.php > /dev/null 2>&1

The /etc/cacti.conf reflects the new parameters OK.

Set the browser to http://localhost/cacti/ to bring up the User Login prompt.
The cactus/password combination was rejected.

???

CC: (none) => tarazed25

Comment 4 Len Lawrence 2016-05-05 07:15:52 CEST
The new user is definitely in the database:
$ mysql -p -ucactus
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 26560
.........................
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| cacti              |
| information_schema |
+--------------------+
2 rows in set (0.00 sec)
Comment 5 Len Lawrence 2016-05-05 08:01:50 CEST
Just noticed this in the tutorial:
Log in the with a username/password of admin. You will be required to change this password immediately.

admin/admin was rejected
Since I had worked on a previous bug for cacti this stage must have been passed.
And I have no way of recovering the actual admin password.  Looks like cacti needs to be dropped and the whole process started from scratch.  This has taken hours so far.
Comment 6 Herman Viaene 2016-05-05 13:22:46 CEST
MGA-32 on AcerD620 Xfce
No installation issues.
Followed procedure as per bug 13930 and executed them successfully.

CC: (none) => herman.viaene
Whiteboard: has_procedure => has_procedure MGA5-32-OK

Comment 7 Lewis Smith 2016-05-09 22:05:47 CEST
Testing M5 x64 real h/w OK

With an ongoing Cacti setup, updated it to:
 cacti-0.8.8f-1.4.mga5

http://localhost/cacti then appeared & behaved normally, both for graphs & users.

CC: (none) => lewyssmith
Whiteboard: has_procedure MGA5-32-OK => has_procedure MGA5-32-OK MGA5-64-OK

Comment 8 Lewis Smith 2016-05-11 13:06:07 CEST
Update validated.
Advisory uploaded as per Comment 2.

Keywords: (none) => validated_update
Whiteboard: has_procedure MGA5-32-OK MGA5-64-OK => has_procedure MGA5-32-OK MGA5-64-OK advisory
CC: (none) => sysadmin-bugs

Comment 9 David Walser 2016-05-11 21:06:40 CEST
Another security issue was fixed in 0.8.8h.

Upstream patch added and Mageia 5 package rebuilt.  (Cauldron has 0.8.8h).

LWN reference for CVE-2016-3659:
http://lwn.net/Vulnerabilities/687042/

Advisory:
========================

Updated cacti package fixes security vulnerability:

SQL injection vulnerability in tree.php in Cacti 0.8.8g and earlier allows
remote authenticated users to execute arbitrary SQL commands via the parent_id
parameter in an item_edit action (CVE-2016-3172).

SQL injection vulnerability in graph_view.php in Cacti 0.8.8.g and earlier
allows remote authenticated users to execute arbitrary SQL commands via the
host_group_data parameter (CVE-2016-3659).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3172
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3659
http://openwall.com/lists/oss-security/2016/03/15/11
========================

Updated packages in core/updates_testing:
========================
cacti-0.8.8f-1.5.mga5

from cacti-0.8.8f-1.5.mga5.src.rpm

Keywords: validated_update => (none)
CC: sysadmin-bugs => (none)
Summary: cacti new security issue CVE-2016-3172 => cacti new security issues CVE-2016-3172 and CVE-2016-3659
Whiteboard: has_procedure MGA5-32-OK MGA5-64-OK advisory => has_procedure

Comment 10 Lewis Smith 2016-05-12 12:37:10 CEST
Testing x64 real h/w: cacti-0.8.8f-1.5.mga5

Upgraded, added several graphs for a second user. One of which (a disc partition) did not show at all, despite being listed; another just skeletally: CPU usage
Re-logged as admin user, confirm that the CPU usage graph only shows skeletally, not correctly. The disc usage graph missing from the other user is correct her.

I cannot say whether this is a reversion; could have overlooked it before. But unlikely - it stands out. Only learning how to drive this thing.
If somebody else could confirm this ...
Comment 11 Herman Viaene 2016-05-16 14:48:04 CEST
MGA-32 on AcerD620 Xfce
No installation issues. I installed the new version over the existing 0.8.8f-1.4.

I get into all sorts of problems with the existing cacti database in mysql, up to the point I cannot connect anymore "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in '/etc/cacti.conf' "
Surely the mysql runs and I can connect to the mediawiki (from a previous update test), and the database name I see in /etc/cacti.conf is the same I see in phpmyadmin.
Comment 12 Herman Viaene 2016-05-16 15:50:51 CEST
Deleted the existing cacti database with phpmyadmin and started the database creation all over: All works OK, could create a graph for memory usage, processes and logged in users.
So it seems to work, but upgrading from a previous version????

Whiteboard: has_procedure => has_procedure MGA5-32-OK

Comment 13 Herman Viaene 2016-05-18 14:09:43 CEST
Not sure if this is important for the issue with the upgrading, but I noticed that after the upgrading the date on the /etc/cacti.conf file was still the same as before (3 may as from the previous update test), and apparently its content was not changed either AFAICS. I've seen upgrades of packages which give a warning about overwriting or updating .conf files and saving the old one, but I did not notice anything like that. Could this have resulted in an inconsistent configuration of cacti????
Comment 14 David Walser 2016-05-18 18:07:09 CEST
OpenSuSE has issued an advisory for this today (May 18):
https://lists.opensuse.org/opensuse-updates/2016-05/msg00074.html

Advisory:
========================

Updated cacti package fixes security vulnerability:

SQL injection vulnerability in tree.php in Cacti 0.8.8g and earlier allows
remote authenticated users to execute arbitrary SQL commands via the parent_id
parameter in an item_edit action (CVE-2016-3172).

SQL injection vulnerability in graph_view.php in Cacti 0.8.8.g and earlier
allows remote authenticated users to execute arbitrary SQL commands via the
host_group_data parameter (CVE-2016-3659).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3172
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3659
https://lists.opensuse.org/opensuse-updates/2016-05/msg00074.html
Comment 15 claire robinson 2016-05-18 18:22:20 CEST
The issues are likely left over configuration files from the previous installation Herman. Config files are not overwritten if they have been altered from the packaged version. They're usually not removed either when uninstalling.

See in the spec here, %config(noreplace) in the %files section at the end
https://svnweb.mageia.org/packages/updates/5/cacti/current/SPECS/cacti.spec?view=markup

Validating.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 16 claire robinson 2016-05-18 18:39:49 CEST
Advisory updated.

Whiteboard: has_procedure MGA5-32-OK => has_procedure advisory MGA5-32-OK

David Walser 2016-05-18 19:26:15 CEST

URL: (none) => http://lwn.net/Vulnerabilities/687864/

Comment 17 Mageia Robot 2016-05-18 22:15:18 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGASA-2016-0178.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.