[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <567952B2.2080905@stressinduktion.org>
Date: Tue, 22 Dec 2015 14:40:02 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: Huw Davies <huw@...eweavers.com>, netdev@...r.kernel.org,
linux-security-module@...r.kernel.org, selinux@...ho.nsa.gov
Cc: Paul Moore <pmoore@...hat.com>
Subject: Re: [RFC PATCH 13/17] calipso: Allow request sockets to be relabelled
by the lsm.
On 22.12.2015 12:46, Huw Davies wrote:
> tot_len += sizeof(*opt2);
> - opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
> + if (sk)
> + opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
> + else
> + opt2 = kmalloc(tot_len, GFP_ATOMIC);
> if (!opt2)
> return ERR_PTR(-ENOBUFS);
This change looks dangerous to me in terms of control of memory
depletion from a remote host. Could you use sk_to_full_sk and account
options towards the listener socket?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists