Thread (3 messages) 3 messages, 3 authors, 2018-07-04

[RFC PATCH v2] ipv6: make ipv6_renew_options() interrupt/kernel safe

From: paul@paul-moore.com (Paul Moore)
Date: 2018-07-04 12:36:25
Also in: netdev, selinux

On Wed, Jul 4, 2018 at 1:29 AM David Miller [off-list ref] wrote:
From: Paul Moore <redacted>
Date: Mon, 02 Jul 2018 14:20:52 -0400
quoted
-static int ipv6_renew_option(void *ohdr,
-                          struct ipv6_opt_hdr __user *newopt, int newoptlen,
-                          int inherit,
-                          struct ipv6_opt_hdr **hdr,
-                          char **p)
+static void ipv6_renew_option(int renewtype,
+                           struct ipv6_opt_hdr **dest,
+                           struct ipv6_opt_hdr *old,
+                           struct ipv6_opt_hdr *new,
+                           int newtype, char **p)
 {
 ...
quoted
+     p += CMSG_ALIGN(ipv6_optlen(*dest));
I don't think this actually advances the pointer in the caller,
you need something like:

        *p += CMSG_ALIGN(ipv6_optlen(*dest));
Yep, my mistake (typo); thanks for catching it.  Rebuilding a test
kernel now ...

-- 
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help