From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 14 16:30:29 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D47DF16A407 for ; Sat, 14 Oct 2006 16:30:29 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6881143D75 for ; Sat, 14 Oct 2006 16:30:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9EGUJW4086213 for ; Sat, 14 Oct 2006 16:30:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9EGUJ20086208; Sat, 14 Oct 2006 16:30:19 GMT (envelope-from gnats) Resent-Date: Sat, 14 Oct 2006 16:30:19 GMT Resent-Message-Id: <200610141630.k9EGUJ20086208@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bryce Riner Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CCD416A403 for ; Sat, 14 Oct 2006 16:24:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B56243D49 for ; Sat, 14 Oct 2006 16:24:36 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k9EGOa3h012262 for ; Sat, 14 Oct 2006 16:24:36 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k9EGOZCW012261; Sat, 14 Oct 2006 16:24:36 GMT (envelope-from nobody) Message-Id: <200610141624.k9EGOZCW012261@www.freebsd.org> Date: Sat, 14 Oct 2006 16:24:36 GMT From: Bryce Riner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: misc/104422: TCP-MD5 key length limits X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2006 16:30:29 -0000 >Number: 104422 >Category: misc >Synopsis: TCP-MD5 key length limits >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 14 16:30:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Bryce Riner >Release: 6.1 >Organization: >Environment: FreeBSD xorp.emerson.edu 6.1-RELEASE FreeBSD 6.1-RELEASE #2: Sat Oct 14 12:00:10 EDT 2006 root@xorp.emerson.edu:/usr/src/sys/i386/compile/ROUTER i386 >Description: When trying to add a TCP-MD5 key with length 11 octets (88 bits) I get "The result of line 3: Invalid argument." from "setkey -f" and with IPSEC_DEBUG on "key_mature: invalid AH key length 88 (1-80 allowed)" out of dmesg. Now the RFC says this about key length: "It is strongly recommended that an implementation be able to support at minimum a key composed of a string of printable ASCII of 80 bytes or less, as this is current practice." The setkey man page has this in it's table: " algorithm keylen (bits) comment .. tcp-md5 8 to 640 tcp: rfc2385 " It would appear that the kernel is checking the key length in bits against min/max in octets. >How-To-Repeat: >Fix: Change documentation to properly reflect kernel behavior. Change kernel to properly check key sizes. Use only 10 octet or 80 bit long keys. >Release-Note: >Audit-Trail: >Unformatted: