ID PACKETSTORM:111879 Type packetstorm Reporter Paul Szabo Modified 2012-04-16T00:00:00

Description

`"If you're doing anything technical, think Mathematica --..."
http://www.wolfram.com/products/mathematica/index.html
Mathematica7 on Linux uses the /tmp/MathLink directory in insecure ways.
Mathematica creates or re-uses an existing /tmp/MathLink directory, and
overwrites files within and follows symlinks. This type of behaviour is
"known unsafe" on multi-user machines e.g. University login servers.
As a classic example of a symlink attack, if an "attacker" uses:
mkdir /tmp/MathLink; ln -s /home/victim/.bashrc /tmp/MathLink/.gshmm
then when the victim runs Mathematica his ~/.bashrc will be clobbered.
New files are created world-writable, allowing a complete compromise of
the user account by linking to ~/.bash_logout . (If root ever uses
Mathematica then the damage is greater.)
Mathematica uses also /tmp/fonts$$.conf in insecure ways.
Workaround: use command-line math instead of pretty interface.
Notified support at wolfram.com on 7 May 2010, was assigned [TS 16194].
Cheers,
Paul Szabo psz at maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics University of Sydney Australia
Addendum:
Date: Sun, 15 Apr 2012 08:28:34 +1000
From: paul.szabo@sydney.edu.au
Subject: Mathematica8.0.4 on Linux /tmp/MathLink vulnerability
The problem reported for Mathematica became worse at version 8.0.4,
present for the command-line interface "math" also.
Cheers,
Paul Szabo psz@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics University of Sydney Australia
`

{"hash": "ac17d50b76657bdefb56161471b98a003a74f40dd6894e645c9734f2fcc69f85", "edition": 1, "references": [], "objectVersion": "1.2", "viewCount": 1, "type": "packetstorm", "description": "", "bulletinFamily": "exploit", "href": "https://packetstormsecurity.com/files/111879/Mathematica-On-Linux-tmp-Vulnerability.html", "hashmap": [{"key": "bulletinFamily", "hash": "708697c63f7eb369319c6523380bdf7a"}, {"key": "cvelist", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "cvss", "hash": "d4be9c4fc84262b4f39f89565918568f"}, {"key": "description", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "href", "hash": "66406490d6c717addf6a8369385ae096"}, {"key": "modified", "hash": "dacc91449739c1db46c820f32020ab0d"}, {"key": "objectVersion", "hash": "56765472680401499c79732468ba4340"}, {"key": "published", "hash": "dacc91449739c1db46c820f32020ab0d"}, {"key": "references", "hash": "d41d8cd98f00b204e9800998ecf8427e"}, {"key": "reporter", "hash": "5e2124a5719079aa289052e1cfd7d011"}, {"key": "sourceData", "hash": "da5024071893347c56c7ca4e64194467"}, {"key": "sourceHref", "hash": "1e93d7d55ffe997fda4c08ad3d9e2b3b"}, {"key": "title", "hash": "ca24ca8657f3b6f2271440c967fff3fb"}, {"key": "type", "hash": "6466ca3735f647eeaed965d9e71bd35d"}], "published": "2012-04-16T00:00:00", "modified": "2012-04-16T00:00:00", "title": "Mathematica On Linux /tmp Vulnerability", "cvelist": [], "sourceHref": "https://packetstormsecurity.com/files/download/111879/mathematica-insecure.txt", "history": [], "reporter": "Paul Szabo", "lastseen": "2016-11-03T10:27:38", "cvss": {"vector": "NONE", "score": 0.0}, "enchantments": {"score": {"value": -0.1, "vector": "NONE", "modified": "2016-11-03T10:27:38", "rev": 2}, "dependencies": {"references": [], "modified": "2016-11-03T10:27:38", "rev": 2}, "vulnersScore": -0.1}, "sourceData": "`\"If you're doing anything technical, think Mathematica --...\" \nhttp://www.wolfram.com/products/mathematica/index.html \n \nMathematica7 on Linux uses the /tmp/MathLink directory in insecure ways. \nMathematica creates or re-uses an existing /tmp/MathLink directory, and \noverwrites files within and follows symlinks. This type of behaviour is \n\"known unsafe\" on multi-user machines e.g. University login servers. \nAs a classic example of a symlink attack, if an \"attacker\" uses: \n \nmkdir /tmp/MathLink; ln -s /home/victim/.bashrc /tmp/MathLink/.gshmm \n \nthen when the victim runs Mathematica his ~/.bashrc will be clobbered. \nNew files are created world-writable, allowing a complete compromise of \nthe user account by linking to ~/.bash_logout . (If root ever uses \nMathematica then the damage is greater.) \n \nMathematica uses also /tmp/fonts$$.conf in insecure ways. \n \nWorkaround: use command-line math instead of pretty interface. \n \nNotified support at wolfram.com on 7 May 2010, was assigned [TS 16194]. \n \nCheers, \n \nPaul Szabo psz at maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ \nSchool of Mathematics and Statistics University of Sydney Australia \n \n \n \n \nAddendum: \n \nDate: Sun, 15 Apr 2012 08:28:34 +1000 \nFrom: paul.szabo@sydney.edu.au \nSubject: Mathematica8.0.4 on Linux /tmp/MathLink vulnerability \n \nThe problem reported for Mathematica became worse at version 8.0.4, \npresent for the command-line interface \"math\" also. \n \nCheers, \n \nPaul Szabo psz@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ \nSchool of Mathematics and Statistics University of Sydney Australia \n \n \n`\n", "id": "PACKETSTORM:111879"}