[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150320.163217.1133959916107908748.davem@davemloft.net>
Date: Fri, 20 Mar 2015 16:32:17 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: catalin.marinas@....com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
will.deacon@....com, dan.carpenter@...cle.com
Subject: Re: [PATCH] net: compat: Update get_compat_msghdr() to match
copy_msghdr_from_user() behaviour
From: Catalin Marinas <catalin.marinas@....com>
Date: Fri, 20 Mar 2015 16:48:13 +0000
> Commit db31c55a6fb2 (net: clamp ->msg_namelen instead of returning an
> error) introduced the clamping of msg_namelen when the unsigned value
> was larger than sizeof(struct sockaddr_storage). This caused a
> msg_namelen of -1 to be valid. The native code was subsequently fixed by
> commit dbb490b96584 (net: socket: error on a negative msg_namelen).
>
> In addition, the native code sets msg_namelen to 0 when msg_name is
> NULL. This was done in commit (6a2a2b3ae075 net:socket: set msg_namelen
> to 0 if msg_name is passed as NULL in msghdr struct from userland) and
> subsequently updated by 08adb7dabd48 (fold verify_iovec() into
> copy_msghdr_from_user()).
>
> This patch brings the get_compat_msghdr() in line with
> copy_msghdr_from_user().
>
> Fixes: db31c55a6fb2 (net: clamp ->msg_namelen instead of returning an error)
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Catalin Marinas <catalin.marinas@....com>
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists