diff options
author | Renato Botelho <garga@FreeBSD.org> | 2016-06-12 13:21:20 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2016-06-12 13:21:20 +0000 |
commit | 8f8af74a04eda98cd58e47012aec1160371724a2 (patch) | |
tree | f53980e6c481d354afc2dc89a4531ad6b306a6a6 | |
parent | 5a3ac8d67f3285655e87fa8d7329ecf055e0f034 (diff) | |
download | ports-8f8af74a04eda98cd58e47012aec1160371724a2.tar.gz ports-8f8af74a04eda98cd58e47012aec1160371724a2.zip |
MFH: r416751
Add a patch to fix sudo bug #743 that causes a bug where it dereference
a NULL pointer when it looks up a negative cached entry which is stored
as a NULL passwd or group struct pointer
PR: 208198
Submitted by: Fredrik Eriksson <fredrik.eriksson@loopia.se>
Obtained from: https://www.sudo.ws/repos/sudo/rev/1d13341d53ec
Sponsored by: Rubicon Communications (Netgate)
Approved by: ports-secteam (feld)
Notes
Notes:
svn path=/branches/2016Q2/; revision=416802
-rw-r--r-- | security/sudo/Makefile | 1 | ||||
-rw-r--r-- | security/sudo/files/patch-fix_bz208198 | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/security/sudo/Makefile b/security/sudo/Makefile index 82280c071547..b708d58ee713 100644 --- a/security/sudo/Makefile +++ b/security/sudo/Makefile @@ -3,6 +3,7 @@ PORTNAME= sudo PORTVERSION= 1.8.16 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SUDO diff --git a/security/sudo/files/patch-fix_bz208198 b/security/sudo/files/patch-fix_bz208198 new file mode 100644 index 000000000000..8ef2e1efea9e --- /dev/null +++ b/security/sudo/files/patch-fix_bz208198 @@ -0,0 +1,35 @@ +--- plugins/sudoers/pwutil.c Thu Apr 28 15:27:53 2016 -0600 ++++ plugins/sudoers/pwutil.c Wed May 04 08:55:21 2016 -0600 +@@ -139,8 +139,8 @@ + item = node->data; + sudo_debug_printf(SUDO_DEBUG_DEBUG, + "%s: uid %u [%s] -> user %s [%s] (cache hit)", __func__, +- (unsigned int)uid, key.registry, item->d.pw->pw_name, +- item->registry); ++ (unsigned int)uid, key.registry, ++ item->d.pw ? item->d.pw->pw_name : "unknown", item->registry); + goto done; + } + /* +@@ -202,8 +202,8 @@ + if ((node = rbfind(pwcache_byname, &key)) != NULL) { + item = node->data; + sudo_debug_printf(SUDO_DEBUG_DEBUG, +- "%s: user %s [%s] -> uid %u [%s] (cache hit)", __func__, name, +- key.registry, (unsigned int)item->d.pw->pw_uid, item->registry); ++ "%s: user %s [%s] -> uid %d [%s] (cache hit)", __func__, name, ++ key.registry, item->d.pw ? (int)item->d.pw->pw_uid : -1, item->registry); + goto done; + } + /* +@@ -461,8 +461,8 @@ + item = node->data; + sudo_debug_printf(SUDO_DEBUG_DEBUG, + "%s: gid %u [%s] -> group %s [%s] (cache hit)", __func__, +- (unsigned int)gid, key.registry, item->d.gr->gr_name, +- item->registry); ++ (unsigned int)gid, key.registry, ++ item->d.gr ? item->d.gr->gr_name : "unknown", item->registry); + goto done; + } + /* |