Subject: [PATCH net 0/2] net: diag: fix a potential security issue

From: Xin Long <[email-masked]>
Date: Thu, 19 Oct 2017 15:32:23 +0800

This patch is to void the potential security issue that the family
or protocol modules are autoloaded when requesting _diag module by
not requesting _diag module if the family or protocol is not added
or registered in sock_diag and inet_diag.

As the repost of the patch '[PATCH net] sock_diag: request _diag
module only when the family or proto has been registered', this
patchset fixes the compiling errors when INET is not set, and
also split into two patches to make it clear to review.

Xin Long (2):
  sock_diag: request _diag module only when the family has been
    registered
  inet_diag: request _diag module only when the proto has been
    registered

 include/linux/net.h    |  1 +
 include/net/protocol.h |  1 +
 net/core/sock_diag.c   | 21 +++++++++++++--------
 net/ipv4/inet_diag.c   |  3 ++-
 net/ipv4/protocol.c    |  6 ++++++
 net/socket.c           |  5 +++++
 6 files changed, 28 insertions(+), 9 deletions(-)

-- 
2.1.0