Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 441840 - <app-admin/webmin-1.600-r1: Change Passwords Module Cross-Site Scripting Vulnerability
Summary: <app-admin/webmin-1.600-r1: Change Passwords Module Cross-Site Scripting Vuln...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Security
URL: https://secunia.com/advisories/51201/
Whiteboard: ~4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-05 09:46 UTC by Agostino Sarubbo
Modified: 2012-11-08 00:39 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The security patch for the passwd module of Webmin v1.600 (webmin-1.600-SA51201.patch,3.26 KB, patch)
2012-11-05 19:11 UTC, PhobosK
no flags Details | Diff
The new Webmin ebuild revision 1, that applies the vulnerability fix to the passwd module (webmin-1.600-r1.ebuild,8.83 KB, text/plain)
2012-11-05 19:14 UTC, PhobosK
no flags Details
The new Webmin ebuild revision 2, that applies the vulnerability fix to the passwd module for full Webmin version only (webmin-1.600-r2.ebuild,8.83 KB, text/plain)
2012-11-06 21:18 UTC, PhobosK
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2012-11-05 09:46:21 UTC
From https://secunia.com/advisories/51201/ :

Description
A vulnerability has been reported in Webmin, which can be exploited by malicious people to conduct 
cross-site scripting attacks.

Input passed via the real name field is not properly sanitised before being returned to the user. 
This can be exploited to execute arbitrary HTML and script code in a user's browser session in 
context of an affected site.

The vulnerability is reported in version 1.600. Other versions may also be affected.


Solution
Apply fix.
Further details available in Customer Area

Provided and/or discovered by
Reported by the vendor.

Original Advisory
http://www.webmin.com/updates.html
Comment 1 PhobosK 2012-11-05 19:11:23 UTC
Created attachment 328468 [details, diff]
The security patch for the passwd module of Webmin v1.600

The vulnerability was fixed by the author in a new version of the passwd module (1.605). See the note about Webmin v1.600 here: http://www.webmin.com/updates.html

So this is the patch that applies the upgrade of the passwd module to 1.605
The new ebuild of Webmin follows - webmin-1.600-r1.ebuild
Comment 2 PhobosK 2012-11-05 19:14:56 UTC
Created attachment 328470 [details]
The new Webmin ebuild revision 1, that applies the vulnerability fix to the passwd module

This is the actual ebuild applying the security patch to the Webmin's passwd module.

You may commit to main tree and close this bug.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2012-11-05 21:40:08 UTC
+*webmin-1.600-r1 (05 Nov 2012)
+
+  05 Nov 2012; Markos Chandras <hwoarang@gentoo.org>
+  +files/webmin-1.600-SA51201.patch, +webmin-1.600-r1.ebuild,
+  -webmin-1.600.ebuild:
+  Revbump to fix security problem in #441840. Thanks to PhobosK
+  <phobosk@fastmail.fm>. Remove old ebuild
+
Comment 4 Joakim 2012-11-06 08:41:19 UTC
There seems to be a problem with the patch but maybe it's just for the USE=minimal version?

>>> Emerging (3 of 4) app-admin/webmin-1.600-r1
 * webmin-1.600-minimal.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                   [ ok ]
>>> Unpacking source...
>>> Unpacking webmin-1.600-minimal.tar.gz to /var/tmp/portage/app-admin/webmin-1.600-r1/work
>>> Source unpacked in /var/tmp/portage/app-admin/webmin-1.600-r1/work
>>> Preparing source in /var/tmp/portage/app-admin/webmin-1.600-r1/work/webmin-1.600 ...
 * Applying webmin-1.600-SA51201.patch ...

 * Failed Patch: webmin-1.600-SA51201.patch !
 *  ( /usr/portage/app-admin/webmin/files/webmin-1.600-SA51201.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/app-admin/webmin-1.600-r1/temp/webmin-1.600-SA51201.patch.out

 * ERROR: app-admin/webmin-1.600-r1 failed (prepare phase):
 *   Failed Patch: webmin-1.600-SA51201.patch!
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 2750:  Called epatch '/usr/portage/app-admin/webmin/files/webmin-1.600-SA51201.patch'
 *   environment, line 1099:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of `emerge --info '=app-admin/webmin-1.600-r1'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/webmin-1.600-r1'`.
 * The complete build log is located at '/var/tmp/portage/app-admin/webmin-1.600-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-admin/webmin-1.600-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-admin/webmin-1.600-r1/work/webmin-1.600'
 * S: '/var/tmp/portage/app-admin/webmin-1.600-r1/work/webmin-1.600'

>>> Failed to emerge app-admin/webmin-1.600-r1, Log file:

>>>  '/var/tmp/portage/app-admin/webmin-1.600-r1/temp/build.log'

Here is build.log for "# emerge -pqv '=app-admin/webmin-1.600-r1'", it's short.

# cat /var/tmp/portage/app-admin/webmin-1.600-r1/temp/build.log    
 * Package:    app-admin/webmin-1.600-r1
 * Repository: gentoo
 * Maintainer: hwoarang@gentoo.org phobosk@fastmail.fm,proxy-maint@gentoo.org
 * USE:        amd64 elibc_glibc kernel_linux minimal multilib postgres ssl userland_GNU
 * FEATURES:   preserve-libs sandbox
>>> Unpacking source...
>>> Unpacking webmin-1.600-minimal.tar.gz to /var/tmp/portage/app-admin/webmin-1.600-r1/work
>>> Source unpacked in /var/tmp/portage/app-admin/webmin-1.600-r1/work
>>> Preparing source in /var/tmp/portage/app-admin/webmin-1.600-r1/work/webmin-1.600 ...
 * Applying webmin-1.600-SA51201.patch ...

 * Failed Patch: webmin-1.600-SA51201.patch !
 *  ( /usr/portage/app-admin/webmin/files/webmin-1.600-SA51201.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/app-admin/webmin-1.600-r1/temp/webmin-1.600-SA51201.patch.out

 * ERROR: app-admin/webmin-1.600-r1 failed (prepare phase):
 *   Failed Patch: webmin-1.600-SA51201.patch!
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 2750:  Called epatch '/usr/portage/app-admin/webmin/files/webmin-1.600-SA51201.patch'
 *   environment, line 1099:  Called die
 * The specific snippet of code:
 *               die "Failed Patch: ${patchname}!";
 * 
 * If you need support, post the output of `emerge --info '=app-admin/webmin-1.600-r1'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/webmin-1.600-r1'`.
 * The complete build log is located at '/var/tmp/portage/app-admin/webmin-1.600-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-admin/webmin-1.600-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-admin/webmin-1.600-r1/work/webmin-1.600'
 * S: '/var/tmp/portage/app-admin/webmin-1.600-r1/work/webmin-1.600'
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-11-06 09:29:52 UTC
I haven't tested the minimal version. Does it work without it?
Comment 6 Joakim 2012-11-06 14:40:39 UTC
(In reply to comment #5)
> I haven't tested the minimal version. Does it work without it?

I don't know, I only use minimal, but I wonder if what happens isn't that the file(s) to patch simply isn't included in the minimal package. I don't have time to check this before about 2 days though due to work pressure w/ a deadline.
Comment 7 PhobosK 2012-11-06 21:18:09 UTC
Created attachment 328598 [details]
The new Webmin ebuild revision 2, that applies the vulnerability fix to the passwd module for full Webmin version only

Sorry it is my fault. I forgot that minimal is not having the passwd module, so no fix is needed for it.

This is the r2 of the ebuild, that applies the patch only for the full Webmin version.

It should fix all problems now.
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2012-11-07 18:52:00 UTC
Thanks. Fixed. No revbump as it was a build failure
Comment 9 Sean Amoss (RETIRED) gentoo-dev Security 2012-11-08 00:39:49 UTC
Thanks, everyone. Closing noglsa for ~arch only.