[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180623.105706.385733107379565893.davem@davemloft.net>
Date: Sat, 23 Jun 2018 10:57:06 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: pmoore@...hat.com
Cc: netdev@...r.kernel.org, selinux@...ho.nsa.gov,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH] ipv6: avoid copy_from_user() via
ipv6_renew_options_kern()
From: Paul Moore <pmoore@...hat.com>
Date: Fri, 22 Jun 2018 17:18:20 -0400
> - const mm_segment_t old_fs = get_fs();
> -
> - set_fs(KERNEL_DS);
> - ret_val = ipv6_renew_options(sk, opt, newtype,
> - (struct ipv6_opt_hdr __user *)newopt,
> - newoptlen);
> - set_fs(old_fs);
So is it really the case that the traditional construct:
set_fs(KERNEL_DS);
... copy_{from,to}_user(...);
set_fs(old_fs);
is no longer allowed?
Setting fs to KERNEL_DS is supposed to make user copies work on kernel
memory. Or at least it did for 20+ years :-)
Powered by blists - more mailing lists