Skip to contentSkip to conversation

include/linux/ipv6.h, struct ipv6_devconf leaks to userspace

DISCUSSION Olaf Hering 2 participants 2 messages Jul 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Found by make O="$header_dir" headers_install_all in 2.6.26:

struct ipv6_devconf contains conditional members, guarded by CONFIG_*.

Please move the struct into #ifdef __KERNEL__

Olaf

maintainer
#1 lore raw

From: Olaf Hering <[email protected]>
Date: Mon, 21 Jul 2008 14:34:30 +0200

Quoted 6 lines

Found by make O="$header_dir" headers_install_all in 2.6.26:

struct ipv6_devconf contains conditional members, guarded by CONFIG_*.

Please move the struct into #ifdef __KERNEL__

I've applied the following patch, let me know if it doesn't fix the problem.

Thanks.

ipv6: __KERNEL__ ifdef struct ipv6_devconf

Based upon a report by Olaf Hering.

---
 include/linux/ipv6.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/linux/ipv6.h +2 -0
index 391ad08..641e026 100644
@@ -123,6 +123,7 @@ struct ipv6hdr {
 	struct	in6_addr	daddr;
 };
 
+#ifdef __KERNEL__
 /*
  * This structure contains configuration options per IPv6 link.
  */
@@ -167,6 +168,7 @@ struct ipv6_devconf {
 	__s32		accept_dad;
 	void		*sysctl;
 };
+#endif
 
 /* index values for the variables in ipv6_devconf */
 enum {
Signature · 1 line
1.5.6.4.433.g09651