linux-imx/net
Paul Moore 33401ce96a netlabel: fix a problem when setting bits below the previously lowest bit
commit 41c3bd2039 upstream.

The NetLabel category (catmap) functions have a problem in that they
assume categories will be set in an increasing manner, e.g. the next
category set will always be larger than the last.  Unfortunately, this
is not a valid assumption and could result in problems when attempting
to set categories less than the startbit in the lowest catmap node.
In some cases kernel panics and other nasties can result.

This patch corrects the problem by checking for this and allocating a
new catmap node instance and placing it at the front of the list.

Reported-by: Christian Evans <frodox@zoho.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Tested-by: Casey Schaufler <casey@schaufler-ca.com>
[bwh: Backported to 3.2: adjust filename for SMACK]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2014-09-13 23:41:42 +01:00
..
9p 9p: fix off by one causing access violations and memory corruption 2013-08-02 22:14:49 +02:00
802 net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
8021q 8021q: fix a potential memory leak 2014-08-06 18:07:38 +01:00
appletalk appletalk: Fix socket referencing in skb 2014-08-06 18:07:39 +01:00
atm net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
ax25 net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
batman-adv batman-adv: Only write requested number of byte to user buffer 2013-03-20 15:03:39 +00:00
bluetooth Bluetooth: never linger on process exit 2014-09-13 23:41:38 +01:00
bridge bridge: Handle IFLA_ADDRESS correctly when creating bridge device 2014-06-09 13:28:58 +01:00
caif net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
can can: gw: use kmem_cache_free() instead of kfree() 2013-04-25 20:25:35 +01:00
ceph libceph: fix corruption when using page_count 0 page in rbd 2014-06-09 13:29:13 +01:00
core net: sendmsg: fix NULL pointer dereference 2014-09-13 23:41:40 +01:00
dcb dcbnl: fix various netlink info leaks 2013-03-27 02:40:59 +00:00
dccp inet: Fix kmemleak in tcp_v4/6_syn_recv_sock and dccp_v4/6_request_recv_sock 2013-01-16 01:13:24 +00:00
decnet decnet: Fix disappearing sysctl entries 2013-03-20 15:03:28 +00:00
dns_resolver dns_resolver: Null-terminate the right string 2014-08-06 18:07:39 +01:00
dsa net: Fix files explicitly needing to include module.h 2011-10-31 19:30:28 -04:00
econet af_econet: Use current logging styles and neatening 2011-07-03 20:05:16 -07:00
ethernet net: don't clear IFF_XMIT_DST_RELEASE in ether_setup 2011-09-15 14:49:44 -04:00
ieee802154 6lowpan: Uncompression of traffic class field was incorrect 2014-01-03 04:33:32 +00:00
ipv4 netlabel: fix a problem when setting bits below the previously lowest bit 2014-09-13 23:41:42 +01:00
ipv6 Revert "net: ip, ipv6: handle gso skbs in forwarding path" 2014-08-06 18:07:31 +01:00
ipx net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
irda net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
iucv net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
key net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
l2tp net/l2tp: don't fall back on UDP [get|set]sockopt 2014-08-06 18:07:37 +01:00
lapb wan: make LAPB callbacks const 2011-09-16 19:20:20 -04:00
llc net: llc: fix use after free in llc_ui_recvmsg 2014-02-15 19:20:10 +00:00
mac80211 mac80211: don't check netdev state for debugfs read/write 2014-07-11 13:33:43 +01:00
netfilter ipvs: stop tot_stats estimator only under CONFIG_SYSCTL 2014-08-06 18:07:41 +01:00
netlabel netlabel: fix a problem when setting bits below the previously lowest bit 2014-09-13 23:41:42 +01:00
netlink net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
netrom net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
nfc net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
packet af_packet: block BH in prb_shutdown_retire_blk_timer() 2014-01-03 04:33:34 +00:00
phonet inet: prevent leakage of uninitialized memory to user in recv syscalls 2014-01-03 04:33:33 +00:00
rds rds: prevent dereference of a NULL device in rds_iw_laddr_check 2014-04-30 16:23:18 +01:00
rfkill net: add moduleparam.h for users of module_param/MODULE_PARM_DESC 2011-10-31 19:30:29 -04:00
rose net: rose: restore old recvmsg behavior 2014-02-15 19:20:09 +00:00
rxrpc net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
sched act_mirred: do not drop packets when fails to mirror it 2014-06-09 13:28:59 +01:00
sctp net: sctp: fix information leaks in ulpevent layer 2014-08-06 18:07:39 +01:00
sunrpc SUNRPC: Fix races in xs_nospace() 2014-04-02 00:58:50 +01:00
tipc net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
unix net: unix: non blocking recvmsg() should not return -EINTR 2014-04-30 16:23:16 +01:00
wanrouter wanmain: comparing array with NULL 2012-08-19 18:15:24 +01:00
wimax net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
wireless radiotap: fix bitmap-end-finding buffer overrun 2014-02-15 19:20:13 +00:00
x25 net: rework recvmsg handler msg_name and msg_namelen logic 2014-01-03 04:33:33 +00:00
xfrm xfrm_user: ensure user supplied esn replay window is valid 2012-10-10 03:31:25 +01:00
compat.c net: sendmsg: fix NULL pointer dereference 2014-09-13 23:41:40 +01:00
Kconfig NFC: add nfc subsystem core 2011-07-05 15:26:57 -04:00
Makefile NFC: add nfc subsystem core 2011-07-05 15:26:57 -04:00
nonet.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
socket.c net: socket: error on a negative msg_namelen 2014-04-30 16:23:16 +01:00
sysctl_net.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00