From owner-cvs-all@FreeBSD.ORG Mon May 14 05:00:38 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49BA816A406; Mon, 14 May 2007 05:00:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 3B79313C457; Mon, 14 May 2007 05:00:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4E50ceY082380; Mon, 14 May 2007 05:00:38 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4E50cSp082379; Mon, 14 May 2007 05:00:38 GMT (envelope-from cperciva) Message-Id: <200705140500.l4E50cSp082379@repoman.freebsd.org> From: Colin Percival Date: Mon, 14 May 2007 05:00:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libmd/i386 rmd160.S sha.S X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 05:00:38 -0000 cperciva 2007-05-14 05:00:38 UTC FreeBSD src repository Modified files: lib/libmd/i386 rmd160.S sha.S Log: Use unsigned comparisons. Prior to this commit, SHA1_Update and RIPEMD160_Update were broken when all of the following conditions applied: (1) The platform is i386. (2) The program calling *_Update is statically linked to libmd. (3) The buffer provided to *_Update is aligned modulo 4 bytes. (4) The buffer extends beyond 2GB. Due to the design of this code, SHA1_Update and RIPEMD160_Update will still be broken if conditions (1)-(3) apply AND the buffer extends beyond 4GB (i.e., there is an integer overflow in computing "data + len"). Since this remaining bug simply replaces SIGSEGV with a bogus hash (and non-broken programs should never provide such operands) I don't consider it to be a serious problem. MFC After: 1 week PR: kern/102795 Revision Changes Path 1.4 +2 -1 src/lib/libmd/i386/rmd160.S 1.3 +2 -1 src/lib/libmd/i386/sha.S