|
Message-ID: <CAHmME9r-riJFGhmBxbcMOt6dpuPOqyJ-yCdbdshnUpEWzW778A@mail.gmail.com> Date: Tue, 1 Nov 2011 21:43:04 -0400 From: "Jason A. Donenfeld" <Jason@...c4.com> To: oss-security <oss-security@...ts.openwall.com> Subject: CVE request for Calibre 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
Powered by blists - more mailing lists
Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.