Re: [ 22/48] net: sendmsg: fix NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luis,

On Mon, Dec 01, 2014 at 11:45:22AM +0000, Luis Henriques wrote:
> > diff --git a/net/compat.c b/net/compat.c
> > index e9672c8..71ed839 100644
> > --- a/net/compat.c
> > +++ b/net/compat.c
> > @@ -83,7 +83,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov,
> >  {
> >  	int tot_len;
> >  
> > -	if (kern_msg->msg_namelen) {
> > +	if (kern_msg->msg_namelen && kern_msg->msg_namelen) {
> 
> I know my review is already too late for the release,

No problem, there's no deadline for reporting bugs :-)

> but the above
> line isn't correct -- it's checking msg_namelen twice, instead of
> checking msg_name as well:
> 
> 	if (kern_msg->msg_name && kern_msg->msg_namelen)

Woops! I must have failed it by myself while doing it by hand :-(

Queuing the fix now, thank s for reporting!
Willy

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]