Bug 1644

Summary: Allow ip options except source routing
Product: Portable OpenSSH Reporter: jchadima
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: normal CC: djm, dtucker, jchadima, jfch, jjelen
Priority: P2    
Version: 5.2p1   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Patch solving the problem
none
Fixed patch
none
Whitelist of safe options none

Description jchadima 2009-09-01 21:29:14 AEST
Do not fail on all IP options, only on source-routing
Comment 1 jchadima 2009-09-01 21:30:51 AEST
Created attachment 1691 [details]
Patch solving the problem
Comment 2 Darren Tucker 2009-09-01 22:16:53 AEST
Exactly what "problem" are you trying to solve here?

On the patch itself: it does not seem to correctly handle NOP (option 1) and I suspect you could slip a source route past it with just {NOP, LSR, ...}.
Comment 3 Tomas Mraz 2009-09-01 23:36:34 AEST
Created attachment 1693 [details]
Fixed patch

The increment is not right for the other options either - the value in the length octet includes the two bytes for type and length octets.

The attached patch should be right.

The patch is necessary for allowing connections over CIPSO labelled networking to sshd.
Comment 4 Darren Tucker 2009-09-02 10:03:54 AEST
(In reply to comment #3)
> Created an attachment (id=1693) [details]
[...] 
> The patch is necessary for allowing connections over CIPSO labelled
> networking to sshd.

That's not true, it's far broader that that.  It allows all options, present and future (other than source route) regardless of the security implications.

Also, I was curious about the origin of this patch, and it seems the original author was Paul Moore at HP.  Is this the case?  Who are the original authors of the rest of the patches recently submitted?

http://cvs.fedoraproject.org/viewvc/rpms/openssh/F-8/openssh-4.3p2-allow-ip-opts.patch?view=co
Comment 5 jchadima 2009-09-02 14:58:15 AEST
> 
> Also, I was curious about the origin of this patch, and it seems the
> original author was Paul Moore at HP.  Is this the case?  Who are the
> original authors of the rest of the patches recently submitted?
> 
Yes this patch origins from Paul More @Hp. The rest is by Red Hat people: Nalin Dahyabhai, Steve Grubb, Dan Walsh, Tomas Mraz and Jan F. Chadima and maybe others.
Comment 6 Darren Tucker 2009-10-23 10:54:39 AEDT
If we're going to do this we should whitelist known safe options instead, and we should handle IP4 and IP6 connections consistently.  I'll take a look at this for 5.4.
Comment 7 Damien Miller 2010-08-03 15:40:55 AEST
We are freezing for the OpenSSH 5.6 release. Retargetting these bugs to the next release.
Comment 8 Damien Miller 2010-08-03 15:42:35 AEST
Targetting OpenSSH 5.7
Comment 9 Damien Miller 2011-01-24 12:30:49 AEDT
Retarget unclosed bugs from 5.7=>5.8
Comment 10 Damien Miller 2011-09-06 10:34:17 AEST
Retarget unresolved bugs/features to 6.0 release
Comment 11 Damien Miller 2011-09-06 10:36:30 AEST
Retarget unresolved bugs/features to 6.0 release
Comment 12 Damien Miller 2011-09-06 10:39:04 AEST
Retarget unresolved bugs/features to 6.0 release

(try again - bugzilla's "change several" isn't)
Comment 13 Damien Miller 2012-02-24 10:34:26 AEDT
Retarget from 6.0 to 6.1
Comment 14 Damien Miller 2012-02-24 10:38:05 AEDT
Retarget 6.0 => 6.1
Comment 15 Damien Miller 2012-09-07 11:38:07 AEST
Retarget uncompleted bugs from 6.1 => 6.2
Comment 16 Damien Miller 2012-09-07 11:40:35 AEST
Retarget bugs from 6.1 => 6.2
Comment 17 Damien Miller 2013-02-08 11:54:42 AEDT
I think this should be a (very short) whitelist of permitted options rather than a blacklist of a few bad options.
Comment 18 Damien Miller 2013-03-08 10:23:48 AEDT
retarget to openssh-6.3
Comment 19 Damien Miller 2013-07-25 12:17:46 AEST
Retarget to openssh-6.4
Comment 20 Damien Miller 2013-07-25 12:20:41 AEST
Retarget 6.3 -> 6.4
Comment 21 Damien Miller 2013-10-10 10:49:38 AEDT
Removing this from consideration for release until comment #17 is resolved.
Comment 22 Jakub Jelen 2016-06-04 00:05:22 AEST
Created attachment 2824 [details]
Whitelist of safe options

Current version we are using in Fedora and RHEL (written by Petr Lautrbach) is using explicit whitelist of 0, 1, 130, 133 and 134 options instead of previous blacklist. All the other options cause failure as before. I don't know why it was not submitted upstream before so doing now. Let me know if it is acceptable in this way.
Comment 23 Damien Miller 2020-01-25 21:21:38 AEDT
Closing this bug. No clear motivation was ever offered - CIPSO is an expired draft. It and the other option in the proposed whitelist (SEC: rfc1108) is basically equivalent to rfc3514.
Comment 24 Damien Miller 2021-03-04 09:54:40 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle