mirror of
https://git.yoctoproject.org/poky
synced 2026-07-27 07:27:12 +00:00
sudo: backport patch to address CVE 2012-0809
This is a format string vulnerability "that can be used to crash sudo or potentially allow an unauthorized user to elevate privileges." (From OE-Core rev: 286cdd5db60b4f668e75cd9e05efb97acb08b7a6) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e6ea83fece
commit
eaec7e9624
@@ -0,0 +1,33 @@
|
||||
This patch, extracted from upstreams sudo-1.8.3p2.patch.gz addresses the
|
||||
recent Sudo format string vulnerability CVE 2012-0809.
|
||||
|
||||
http://www.sudo.ws/sudo/alerts/sudo_debug.html
|
||||
|
||||
Signed-off-by: Joshua Lock <josh@linux.intel.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
diff -urNa sudo-1.8.3p1/src/sudo.c sudo-1.8.3p2/src/sudo.c
|
||||
--- sudo-1.8.3p1/src/sudo.c Fri Oct 21 09:01:26 2011
|
||||
+++ sudo-1.8.3p2/src/sudo.c Tue Jan 24 15:59:03 2012
|
||||
@@ -1208,15 +1208,15 @@
|
||||
sudo_debug(int level, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
- char *fmt2;
|
||||
+ char *buf;
|
||||
|
||||
if (level > debug_level)
|
||||
return;
|
||||
|
||||
- /* Backet fmt with program name and a newline to make it a single write */
|
||||
- easprintf(&fmt2, "%s: %s\n", getprogname(), fmt);
|
||||
+ /* Bracket fmt with program name and a newline to make it a single write */
|
||||
va_start(ap, fmt);
|
||||
- vfprintf(stderr, fmt2, ap);
|
||||
+ evasprintf(&buf, fmt, ap);
|
||||
va_end(ap);
|
||||
- efree(fmt2);
|
||||
+ fprintf(stderr, "%s: %s\n", getprogname(), buf);
|
||||
+ efree(buf);
|
||||
}
|
||||
Reference in New Issue
Block a user