LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re[2]: [PATCH] netfilter: ipvs: Verify that IP_VS protocol has been re

To: "Simon Horman" <horms@xxxxxxxxxxxx>
Subject: Re[2]: [PATCH] netfilter: ipvs: Verify that IP_VS protocol has been registered
Cc: "Sasha Levin" <levinsasha928@xxxxxxxxx>, wensong@xxxxxxxxxxxx, ja@xxxxxx, kaber@xxxxxxxxx, davem@xxxxxxxxxxxxx, davej@xxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
From: "Hans Schillstrom" <hans@xxxxxxxxxxxxxxx>
Date: Fri, 6 Apr 2012 10:59:23 +0200 (CEST)
Hello Simon

>---- Original Message ----
>From: Simon Horman <horms@xxxxxxxxxxxx>
>To: "Sasha Levin" <levinsasha928@xxxxxxxxx>
>Cc: wensong@xxxxxxxxxxxx, ja@xxxxxx, kaber@xxxxxxxxx, davem@xxxxxxxxxxxxx, 
>davej@xxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, 
>netfilter-devel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
>Sent: Fri, Apr 6, 2012, 1:19 AM
>Subject: Re: [PATCH] netfilter: ipvs: Verify that IP_VS protocol has been 
>registered
>
>On Thu, Apr 05, 2012 at 07:24:33PM -0400, Sasha Levin wrote:
>> The registration of a protocol might fail, there were no checks
>> and all registrations were assumed to be correct. This lead to
>> NULL ptr dereferences when apps tried registering.
>
>Thanks, I will queue up this fix.
>
>Do you have a real-world example of this failing, if so it
>might be worth pushing your change into stable.

I don't think this is a big thing, the only thing that can cause it is out of 
memory,
and that will cause a "kernel death" anyway :-(

here is the code :

register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp)
{
...
        struct ip_vs_proto_data *pd =
                        kzalloc(sizeof(struct ip_vs_proto_data), GFP_ATOMIC);

        if (!pd)
                return -ENOMEM;


>--
>To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>the body of a message to majordomo@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>