Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d2b02ed9487ed25832d19534575052e43f8e0c4f Commit: d2b02ed9487ed25832d19534575052e43f8e0c4f Parent: dfee0a725bb027b749ffdd318eb48b91d564b266 Author: Chris Wright <[EMAIL PROTECTED]> AuthorDate: Fri Mar 9 16:19:17 2007 -0800 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Fri Mar 9 16:19:17 2007 -0800
[IPV6] fix ipv6_getsockopt_sticky copy_to_user leak User supplied len < 0 can cause leak of kernel memory. Use unsigned compare instead. Signed-off-by: Chris Wright <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/ipv6/ipv6_sockglue.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index b82333b..f5f9582 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -804,7 +804,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt, return 0; hdr = opt->hopopt; - len = min_t(int, len, ipv6_optlen(hdr)); + len = min_t(unsigned int, len, ipv6_optlen(hdr)); if (copy_to_user(optval, hdr, ipv6_optlen(hdr))) return -EFAULT; return len; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html