Re: [PATCH] net: avoid put_cmsg() possible copy longer data than input

2016-12-28 Thread David Miller
From: yuan linyu Date: Wed, 28 Dec 2016 22:34:23 +0800 > From: yuan linyu > > if CMSG_ALIGN(sizeof(struct cmsghdr)) > sizeof(struct cmsghdr), > original (cmlen - sizeof(struct cmsghdr)) may greater than > input len. You are doing a lot of unrelated cleanups in this change. This makes it hard

[PATCH] net: avoid put_cmsg() possible copy longer data than input

2016-12-28 Thread yuan linyu
From: yuan linyu if CMSG_ALIGN(sizeof(struct cmsghdr)) > sizeof(struct cmsghdr), original (cmlen - sizeof(struct cmsghdr)) may greater than input len. --- include/linux/socket.h | 12 ++-- net/compat.c | 28 +++- net/core/scm.c | 10 +- n