Deprecating policy capabilities (was: Clarification of labeled IPsec checks)
Quoted 9 lines · Paul Moore
Quoted 8 lines · Christopher J. PeBenito
Quoted 6 lines · Paul Moore
It has been a while since we introduced the netpeer policy capability so I imagine we could start a process of deprecating policies that don't enable it. We could dump a warning message if someone loads a policy with the netpeer capability disabled and then after a few releases (how many?) we could remove the legacy bits from the kernel and reject policies which don't have the netpeer capability set.
Quoted 8 lines
Quoted 5 lines
The common case obviously is no labeling, and in that case, there wouldn't be checks. So I suspect this wouldn't have any real problems. My guess is systems that use this wouldn't be changing their OS very often, and when they do, it would be major jumps (e.g. RHEL6 to RHEL7), so they'd be anticipating changes like this.
Yeah, I agree. I'll throw together a deprecation patch and toss it out so we can have a bit more of a discussion on this.
I just took a closer look at this and as much as I would like to require policies to enable the netpeer capability so we could remove a bunch of old code, I don't think we can do this anytime soon.
The problem is that the kernel still supports old policy versions, back to v15, and the policy capability support wasn't added until policy v22. For obvious reasons, we can't really deprecate a policy capability (at least not the netpeer capability) until our minimum supported policy version is v22 or higher. I'm not sure that is something we can really do at this point - thoughts?
Signature · 8 lines
paul moore security and virtualization @ redhat -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 23 lines · Paul Moore
Quoted 9 lines · Paul Moore
Quoted 8 lines · Christopher J. PeBenito
Quoted 6 lines · Paul Moore
It has been a while since we introduced the netpeer policy capability so I imagine we could start a process of deprecating policies that don't enable it. We could dump a warning message if someone loads a policy with the netpeer capability disabled and then after a few releases (how many?) we could remove the legacy bits from the kernel and reject policies which don't have the netpeer capability set.
Quoted 8 lines
Quoted 5 lines
The common case obviously is no labeling, and in that case, there wouldn't be checks. So I suspect this wouldn't have any real problems. My guess is systems that use this wouldn't be changing their OS very often, and when they do, it would be major jumps (e.g. RHEL6 to RHEL7), so they'd be anticipating changes like this.
Yeah, I agree. I'll throw together a deprecation patch and toss it out so we can have a bit more of a discussion on this.
I just took a closer look at this and as much as I would like to require policies to enable the netpeer capability so we could remove a bunch of old code, I don't think we can do this anytime soon.
Quoted 7 lines
The problem is that the kernel still supports old policy versions, back to v15, and the policy capability support wasn't added until policy v22. For obvious reasons, we can't really deprecate a policy capability (at least not the netpeer capability) until our minimum supported policy version is v22 or higher. I'm not sure that is something we can really do at this point - thoughts?
I doubt that anyone has tested a < v22 policy on a modern system in quite some time... I would wonder if it still works correctly. If it hasn't been it seems like a good idea to deprecate unused, untested configurations for stability and security. There isn't much of a reason to use old policies on new kernels since 1) pre-existing binary policies are unlikely to work on new distros and 2) the toolchain can build new policies from old source.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 32 lines · Joshua Brindle
Quoted 23 lines · Paul Moore
Quoted 9 lines · Paul Moore
Quoted 8 lines · Christopher J. PeBenito
Quoted 6 lines · Paul Moore
It has been a while since we introduced the netpeer policy capability so I imagine we could start a process of deprecating policies that don't enable it. We could dump a warning message if someone loads a policy with the netpeer capability disabled and then after a few releases (how many?) we could remove the legacy bits from the kernel and reject policies which don't have the netpeer capability set.
Quoted 8 lines
Quoted 5 lines
The common case obviously is no labeling, and in that case, there wouldn't be checks. So I suspect this wouldn't have any real problems. My guess is systems that use this wouldn't be changing their OS very often, and when they do, it would be major jumps (e.g. RHEL6 to RHEL7), so they'd be anticipating changes like this.
Yeah, I agree. I'll throw together a deprecation patch and toss it out so we can have a bit more of a discussion on this.
I just took a closer look at this and as much as I would like to require policies to enable the netpeer capability so we could remove a bunch of old code, I don't think we can do this anytime soon.
Quoted 7 lines
The problem is that the kernel still supports old policy versions, back to v15, and the policy capability support wasn't added until policy v22. For obvious reasons, we can't really deprecate a policy capability (at least not the netpeer capability) until our minimum supported policy version is v22 or higher. I'm not sure that is something we can really do at this point - thoughts?
Quoted 7 lines
I doubt that anyone has tested a < v22 policy on a modern system in quite some time... I would wonder if it still works correctly. If it hasn't been it seems like a good idea to deprecate unused, untested configurations for stability and security. There isn't much of a reason to use old policies on new kernels since 1) pre-existing binary policies are unlikely to work on new distros and 2) the toolchain can build new policies from old source.
I thought the requirement was that new kernels cannot break old userspace (including policies), i.e. we have to be able to boot latest kernel with ancient Fedora or RHEL and not have anything break. RHEL4 used policy.18 IIRC. At the moment booting a new kernel with an old distro usually works due to a combination of handle_unknown=allow and policy capabilities not being enabled in the old policy.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 61 lines · Stephen Smalley
Quoted 51 lines · Joshua Brindle
Quoted 37 lines · Paul Moore
Quoted 25 lines · Paul Moore
Quoted 13 lines · Christopher J. PeBenito
Quoted 9 lines · Paul Moore
It has been a while since we introduced the netpeer policy capability so
I imagine we could start a process of deprecating policies that don't enable it. We could dump a warning message if someone loads a policy with the netpeer capability disabled and then after a few releases (how
many?) we could remove the legacy bits from the kernel and reject policies which don't have the netpeer capability set.Quoted 8 lines
The common case obviously is no labeling, and in that case, there wouldn't
be checks. So I suspect this wouldn't have any real problems. My guess
is systems that use this wouldn't be changing their OS very often, and when they do, it would be major jumps (e.g. RHEL6 to RHEL7), so they'd be
anticipating changes like this.Quoted 3 lines
Yeah, I agree. I'll throw together a deprecation patch and toss it out so
we can have a bit more of a discussion on this.I just took a closer look at this and as much as I would like to require policies to enable the netpeer capability so we could remove a bunch of old
code, I don't think we can do this anytime soon.Quoted 11 lines
The problem is that the kernel still supports old policy versions, back to
v15, and the policy capability support wasn't added until policy v22. For
obvious reasons, we can't really deprecate a policy capability (at least not
the netpeer capability) until our minimum supported policy version is v22 or
higher. I'm not sure that is something we can really do at this point - thoughts?Quoted 7 lines
I doubt that anyone has tested a < v22 policy on a modern system in quite some time... I would wonder if it still works correctly. If it hasn't been it seems like a good idea to deprecate unused, untested configurations for stability and security. There isn't much of a reason to use old policies on new kernels since 1) pre-existing binary policies are unlikely to work on new distros and 2) the toolchain can build new policies from old source.
Quoted 7 lines
I thought the requirement was that new kernels cannot break old userspace (including policies), i.e. we have to be able to boot latest kernel with ancient Fedora or RHEL and not have anything break. RHEL4 used policy.18 IIRC. At the moment booting a new kernel with an old distro usually works due to a combination of handle_unknown=allow and policy capabilities not being enabled in the old policy.
Oh right, I forgot that there are people that boot new kernels on ancient distros. How far back does the backward support have to go?
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Deprecating policy capabilities
Quoted 38 lines · Joshua Brindle
Quoted 29 lines · Stephen Smalley
Quoted 19 lines · Joshua Brindle
Quoted 5 lines · Paul Moore
I just took a closer look at this and as much as I would like to require policies to enable the netpeer capability so we could remove a bunch of old
code, I don't think we can do this anytime soon.Quoted 11 lines
The problem is that the kernel still supports old policy versions, back to
v15, and the policy capability support wasn't added until policy v22. For
obvious reasons, we can't really deprecate a policy capability (at least not
the netpeer capability) until our minimum supported policy version is v22 or
higher. I'm not sure that is something we can really do at this point - thoughts?Quoted 7 lines
I doubt that anyone has tested a < v22 policy on a modern system in quite some time... I would wonder if it still works correctly. If it hasn't been it seems like a good idea to deprecate unused, untested configurations for stability and security. There isn't much of a reason to use old policies on new kernels since 1) pre-existing binary policies are unlikely to work on new distros and 2) the toolchain can build new policies from old source.
Quoted 7 lines
I thought the requirement was that new kernels cannot break old userspace (including policies), i.e. we have to be able to boot latest kernel with ancient Fedora or RHEL and not have anything break. RHEL4 used policy.18 IIRC. At the moment booting a new kernel with an old distro usually works due to a combination of handle_unknown=allow and policy capabilities not being enabled in the old policy.
Quoted 2 lines
Oh right, I forgot that there are people that boot new kernels on ancient distros. How far back does the backward support have to go?
I think the view of the kernel developers was forever; new kernel is never supposed to break old userspace. Of course there have been a few examples of that being broken by others in other subsystems, but that is frowned upon.
Even if we were to limit it to currently-supported enterprise distributions, I think we'd have to wait until RHEL-5 (policy.20?) is EOL'd. Don't know about Debian or Ubuntu LTS. Might as well be forever as we likely won't remember this conversation then.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Deprecating policy capabilities
Quoted 8 lines · On Fri, 14 Jun 2013 16:25:52 Stephen Smalley wrote:
Quoted 2 lines
Oh right, I forgot that there are people that boot new kernels on ancient distros. How far back does the backward support have to go?
I think the view of the kernel developers was forever; new kernel is never supposed to break old userspace. Of course there have been a few examples of that being broken by others in other subsystems, but that is frowned upon.
Quoted 4 lines
Even if we were to limit it to currently-supported enterprise distributions, I think we'd have to wait until RHEL-5 (policy.20?) is
EOL'd. Don't know about Debian or Ubuntu LTS. Might as well be
forever as we likely won't remember this conversation then.
Sorry for the late reply, but this is an important an ongoing issue.
In Debian we don't aim to have any support for a kernel that is more than one version of Debian before or after the current version.
Debian/Wheezy works with a Squeeze kernel and I'll include an update to Wheezy to make it work better with a Jessie kernel when Jessie is released.
I will not accept bug reports about problems mixing Jessie and Squeeze parts. So the current userspace can entirely drop support for kernel 2.6.32 and the current kernel code can drop support for policy 20100524 and libselinux 2.0.96 without doing anything that I'll accept as a Debian bug report.
What amount of mixing and matching kernel and userspace versions does Red Hat support?
Signature · 2 lines
My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
Paul Moore
maintainerRe: Deprecating policy capabilities
Quoted 22 lines · Russell Coker
Quoted 8 lines · On Fri, 14 Jun 2013 16:25:52 Stephen Smalley wrote:
Quoted 2 lines
Oh right, I forgot that there are people that boot new kernels on ancient distros. How far back does the backward support have to go?
I think the view of the kernel developers was forever; new kernel is never supposed to break old userspace. Of course there have been a few examples of that being broken by others in other subsystems, but that is frowned upon.
Quoted 4 lines
Even if we were to limit it to currently-supported enterprise distributions, I think we'd have to wait until RHEL-5 (policy.20?) is
EOL'd. Don't know about Debian or Ubuntu LTS. Might as well be
forever as we likely won't remember this conversation then.Sorry for the late reply, but this is an important an ongoing issue.
In Debian we don't aim to have any support for a kernel that is more than one version of Debian before or after the current version.
Debian/Wheezy works with a Squeeze kernel and I'll include an update to Wheezy to make it work better with a Jessie kernel when Jessie is released.
Quoted 8 lines
I will not accept bug reports about problems mixing Jessie and Squeeze parts. So the current userspace can entirely drop support for kernel 2.6.32 and the current kernel code can drop support for policy 20100524 and libselinux 2.0.96 without doing anything that I'll accept as a Debian bug report.
What amount of mixing and matching kernel and userspace versions does Red Hat support?
What an individual distribution supports isn't the critical point here as far as I'm concerned, the issue is that dropping support for older policies, regardless of use, is frowned upon and will likely cause a lot of shouting that I'd just assume avoid.
The only real exception to this that I can see is that if we prove that a older policies no longer work correctly and fixing it in the kernel is non- trivial. Also, when I say "older policies", I'm thinking that the policy has to be out of use from any major distribution for quite some time; anything new we just need to fix.
Signature · 2 lines
paul moore www.paul-moore.com