oss-sec mailing list archives
CVE request for Calibre
From: "Jason A. Donenfeld" <Jason () zx2c4 com>
Date: Tue, 1 Nov 2011 21:43:04 -0400
Hello, There are 5 separate vulnerabilities with the calibre SUID mount helper, with each possibly requiring a different CVE, or perhaps two can be clumped together: These vulnerabilities concern /src/calibre/devices/linux_mount_helper.c http://bazaar.launchpad.net/~kovid/calibre/trunk/view/head:/src/calibre/devices/linux_mount_helper.c 1. Ability to create root owned directory anywhere. The mount helper calls mkdir(argv[3], ...) on line 48. 2. Ability to remove any empty directory on the system. For example, line 172. 3. Ability to create and delete user_controlled_dir/.created_by_calibre_mount_helper anywhere on the filesystem, lines 55 and 165. 4. Ability to inject arguments into 'mount' being exec'd. On lines 78, 81, and 83, the final two arguments to mount are user controlled. On lines 1033, 106, 108, 139, and 141, the last argument to unmount/eject is user controlled. The "exists()" check can be subverted via race condition or by creating an existing file in the working directory with a filename equal to the desired injected argument. 5. Ability to execute any program as root. The mount helper makes use of execlp on lines 78, 81, 83, 103, 106, 108, 139, and 141, and the first argument does not start with a / character. Because of this, execlp will search PATH for the executable to run. PATH is user controlled, and thus it is trivial to write a program that spawns a shell and give it "mount" as a filename, and direct PATH to its directory. These have been reported in bug 885027 for the Calibre project. Thanks, Jason
Current thread:
- CVE request for Calibre Jason A. Donenfeld (Nov 01)
- Re: CVE request for Calibre Jason A. Donenfeld (Nov 01)
- Re: Re: CVE request for Calibre Dan Rosenberg (Nov 03)
- Re: Re: CVE request for Calibre Kurt Seifried (Nov 03)
- Re: Re: CVE request for Calibre Jason A. Donenfeld (Nov 04)
- Re: Re: CVE request for Calibre Jason A. Donenfeld (Nov 04)
- Re: Re: CVE request for Calibre Steven M. Christey (Nov 04)
- Re: Re: CVE request for Calibre Jason A. Donenfeld (Nov 04)
- Re: Re: CVE request for Calibre Kurt Seifried (Nov 06)
- Re: Re: CVE request for Calibre Jason A. Donenfeld (Nov 06)
- Re: Re: CVE request for Calibre Kurt Seifried (Nov 08)
- Re: Re: CVE request for Calibre Dan Rosenberg (Nov 03)
- Re: CVE request for Calibre Jason A. Donenfeld (Nov 01)