]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: fix potential buffer overrun when composing a new options string
authorJeff Layton <jlayton@redhat.com>
Fri, 24 May 2013 11:40:04 +0000 (07:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 19:53:04 +0000 (12:53 -0700)
commit661926a0a9594143ed7f189521d8b8c848f480c7
treedbd98e96ac5eeba40a87ded979ebea2effa4a836
parent968678e436eb6cf11c09068b24acfdffc7f48891
cifs: fix potential buffer overrun when composing a new options string

commit 166faf21bd14bc5c5295a44874bf7f3930c30b20 upstream.

Consider the case where we have a very short ip= string in the original
mount options, and when we chase a referral we end up with a very long
IPv6 address. Be sure to allow for that possibility when estimating the
size of the string to allocate.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifs_dfs_ref.c