lkml.org 
[lkml]   [2005]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/7] [IPSEC] Restrict socket policy loading to CAP_NET_ADMIN - CAN-2005-2555
    -stable review patch.  If anyone has any  objections, please let us know.
    ------------------

    The interface needs much redesigning if we wish to allow
    normal users to do this in some way.

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: "David S. Miller" <davem@davemloft.net>
    Signed-off-by: Chris Wright <chrisw@osdl.org>
    ---
    net/ipv4/ip_sockglue.c | 3 +++
    net/ipv6/ipv6_sockglue.c | 3 +++
    2 files changed, 6 insertions(+)

    Index: linux-2.6.12.y/net/ipv4/ip_sockglue.c
    ===================================================================
    --- linux-2.6.12.y.orig/net/ipv4/ip_sockglue.c
    +++ linux-2.6.12.y/net/ipv4/ip_sockglue.c
    @@ -848,6 +848,9 @@ mc_msf_out:

    case IP_IPSEC_POLICY:
    case IP_XFRM_POLICY:
    + err = -EPERM;
    + if (!capable(CAP_NET_ADMIN))
    + break;
    err = xfrm_user_policy(sk, optname, optval, optlen);
    break;

    Index: linux-2.6.12.y/net/ipv6/ipv6_sockglue.c
    ===================================================================
    --- linux-2.6.12.y.orig/net/ipv6/ipv6_sockglue.c
    +++ linux-2.6.12.y/net/ipv6/ipv6_sockglue.c
    @@ -503,6 +503,9 @@ done:
    break;
    case IPV6_IPSEC_POLICY:
    case IPV6_XFRM_POLICY:
    + retv = -EPERM;
    + if (!capable(CAP_NET_ADMIN))
    + break;
    retv = xfrm_user_policy(sk, optname, optval, optlen);
    break;

    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-08-26 21:25    [W:0.021 / U:1.824 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site