diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/af_unix.h | 2 | ||||
-rw-r--r-- | include/net/neighbour.h | 2 | ||||
-rw-r--r-- | include/net/net_namespace.h | 2 | ||||
-rw-r--r-- | include/net/netlink.h | 4 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 4 | ||||
-rw-r--r-- | include/net/sock.h | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 678e4d6fa317..53b1a2cca421 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -37,7 +37,7 @@ struct unix_skb_parms { | |||
37 | u32 secid; /* Security ID */ | 37 | u32 secid; /* Security ID */ |
38 | #endif | 38 | #endif |
39 | u32 consumed; | 39 | u32 consumed; |
40 | }; | 40 | } __randomize_layout; |
41 | 41 | ||
42 | #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) | 42 | #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) |
43 | 43 | ||
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index afc39e3a3f7c..9816df225af3 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -156,7 +156,7 @@ struct neighbour { | |||
156 | struct rcu_head rcu; | 156 | struct rcu_head rcu; |
157 | struct net_device *dev; | 157 | struct net_device *dev; |
158 | u8 primary_key[0]; | 158 | u8 primary_key[0]; |
159 | }; | 159 | } __randomize_layout; |
160 | 160 | ||
161 | struct neigh_ops { | 161 | struct neigh_ops { |
162 | int family; | 162 | int family; |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 31a2b51bef2c..1c401bd4c2e0 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -148,7 +148,7 @@ struct net { | |||
148 | #endif | 148 | #endif |
149 | struct sock *diag_nlsk; | 149 | struct sock *diag_nlsk; |
150 | atomic_t fnhe_genid; | 150 | atomic_t fnhe_genid; |
151 | }; | 151 | } __randomize_layout; |
152 | 152 | ||
153 | #include <linux/seq_file_net.h> | 153 | #include <linux/seq_file_net.h> |
154 | 154 | ||
diff --git a/include/net/netlink.h b/include/net/netlink.h index 01709172b3d3..ef8e6c3a80a6 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -98,8 +98,8 @@ | |||
98 | * nla_put_u8(skb, type, value) add u8 attribute to skb | 98 | * nla_put_u8(skb, type, value) add u8 attribute to skb |
99 | * nla_put_u16(skb, type, value) add u16 attribute to skb | 99 | * nla_put_u16(skb, type, value) add u16 attribute to skb |
100 | * nla_put_u32(skb, type, value) add u32 attribute to skb | 100 | * nla_put_u32(skb, type, value) add u32 attribute to skb |
101 | * nla_put_u64_64bits(skb, type, | 101 | * nla_put_u64_64bit(skb, type, |
102 | * value, padattr) add u64 attribute to skb | 102 | * value, padattr) add u64 attribute to skb |
103 | * nla_put_s8(skb, type, value) add s8 attribute to skb | 103 | * nla_put_s8(skb, type, value) add s8 attribute to skb |
104 | * nla_put_s16(skb, type, value) add s16 attribute to skb | 104 | * nla_put_s16(skb, type, value) add s16 attribute to skb |
105 | * nla_put_s32(skb, type, value) add s32 attribute to skb | 105 | * nla_put_s32(skb, type, value) add s32 attribute to skb |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index a9519a06a23b..980807d7506f 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -469,6 +469,8 @@ _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member) | |||
469 | 469 | ||
470 | #define _sctp_walk_params(pos, chunk, end, member)\ | 470 | #define _sctp_walk_params(pos, chunk, end, member)\ |
471 | for (pos.v = chunk->member;\ | 471 | for (pos.v = chunk->member;\ |
472 | (pos.v + offsetof(struct sctp_paramhdr, length) + sizeof(pos.p->length) <\ | ||
473 | (void *)chunk + end) &&\ | ||
472 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ | 474 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ |
473 | ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ | 475 | ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ |
474 | pos.v += SCTP_PAD4(ntohs(pos.p->length))) | 476 | pos.v += SCTP_PAD4(ntohs(pos.p->length))) |
@@ -479,6 +481,8 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) | |||
479 | #define _sctp_walk_errors(err, chunk_hdr, end)\ | 481 | #define _sctp_walk_errors(err, chunk_hdr, end)\ |
480 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ | 482 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ |
481 | sizeof(struct sctp_chunkhdr));\ | 483 | sizeof(struct sctp_chunkhdr));\ |
484 | ((void *)err + offsetof(sctp_errhdr_t, length) + sizeof(err->length) <\ | ||
485 | (void *)chunk_hdr + end) &&\ | ||
482 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ | 486 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ |
483 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ | 487 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ |
484 | err = (sctp_errhdr_t *)((void *)err + SCTP_PAD4(ntohs(err->length)))) | 488 | err = (sctp_errhdr_t *)((void *)err + SCTP_PAD4(ntohs(err->length)))) |
diff --git a/include/net/sock.h b/include/net/sock.h index f69c8c2782df..7c0632c7e870 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1128,7 +1128,7 @@ struct proto { | |||
1128 | atomic_t socks; | 1128 | atomic_t socks; |
1129 | #endif | 1129 | #endif |
1130 | int (*diag_destroy)(struct sock *sk, int err); | 1130 | int (*diag_destroy)(struct sock *sk, int err); |
1131 | }; | 1131 | } __randomize_layout; |
1132 | 1132 | ||
1133 | int proto_register(struct proto *prot, int alloc_slab); | 1133 | int proto_register(struct proto *prot, int alloc_slab); |
1134 | void proto_unregister(struct proto *prot); | 1134 | void proto_unregister(struct proto *prot); |