diff options
author | Kaike Wan <kaike.wan@intel.com> | 2016-01-21 08:41:31 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-01-21 11:59:19 -0500 |
commit | 2deeb4772971e56d5bdac0bd3375d5eadaa827fd (patch) | |
tree | 4cba14c057ca5a01b286c6a77d2efc71b65834ad /kernel/utsname.c | |
parent | f9a6ed62c406544d33b1873c0260ef9272ddc215 (diff) | |
download | linux-2deeb4772971e56d5bdac0bd3375d5eadaa827fd.tar.bz2 |
IB/sa: Fix netlink local service GFP crash
The rdma netlink local service registers a handler to handle RESOLVE
response and another handler to handle SET_TIMEOUT request. The first
thing these handlers do is to call netlink_capable() to check the
access right of the received skb to make sure that the sender has root
access. Under normal conditions, such responses and requests will be
directly forwarded to the handlers without going through the netlink_dump
pathway (see ibnl_rcv_msg() in drivers/infiniband/core/netlink.c).
However, a user application could send a RESOLVE request (not response)
to the local service, which will fall into the netlink_dump pathway,
where a new skb will be created without initializing the control block.
This new skb will be eventually forwarded to the local service RESOLVE
response handler. Unfortunately, netlink_capable() will cause general
protection fault if the skb's control block is not initialized. This
patch will address the problem by checking the skb first.
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'kernel/utsname.c')
0 files changed, 0 insertions, 0 deletions