From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 1E5D517DE983 for ; Fri, 20 Mar 2015 22:28:44 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 33B32B5D8A1 for ; Fri, 20 Mar 2015 22:36:02 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id D0F2797A836 for ; Fri, 20 Mar 2015 22:36:04 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LevwT1iWuSlQ for ; Fri, 20 Mar 2015 22:36:04 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 9581897A82B for ; Fri, 20 Mar 2015 22:36:04 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 083BA95241A for ; Fri, 20 Mar 2015 22:36:00 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id A21531204CC; Fri, 20 Mar 2015 22:35:57 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id EB9B812046E for ; Fri, 20 Mar 2015 22:35:53 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=x2Cqc7G03KE+z6BqTpQw3dDf9dc=; b=Ye6jk4vREUen4LxkGC 2ULPwzKuBXtlUPA3u8Ahqt1hnQPmKa66kpUOGxVMS63mkW+arynpSdQkWWSHZg58 QNkslX+1qa3yNekpZjVOgShAX6WV3JIt7RfH2oyOhzD2L3R7xgSXMWkONv5lXzvx TK9wDYwivxSJ1W1aJ75ge/+hE= Received: by filter0063p1mdw1.sendgrid.net with SMTP id filter0063p1mdw1.3065.550C222D14 2015-03-20 13:35:43.495136298 +0000 UTC Received: from herokuapp.com (ec2-54-82-132-218.compute-1.amazonaws.com [54.82.132.218]) by ismtpd-014 (SG) with ESMTP id 14c3765898e.5277.13bb7f for ; Fri, 20 Mar 2015 13:35:43 +0000 (UTC) Date: Fri, 20 Mar 2015 13:35:43 +0000 From: jrusnack@redhat.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 42998 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10988 X-Redmine-Issue-Author: jrusnack X-Redmine-Sender: jrusnack X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6Ddm26KqT2IeL/RK78iD8576p2AaoHOJQ+BF EcdSuMivG62Uf7HX6+kQIR+j5k3jCEwVXhEUOMlfAsQd2LGugzzLTXC8wqgoDxJHbVH95jwsme3Z1K 0bXkwlKFcJTjqJl1jz8YHajKO3bjssK2ZYzY X-ML-Name: ruby-core X-Mail-Count: 68577 Subject: [ruby-core:68577] [Ruby trunk - Bug #10988] [Open] [PATCH] Raise ArgumentError when string passed to String#crypt contains null X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10988 has been reported by Jan Rusnacko. ---------------------------------------- Bug #10988: [PATCH] Raise ArgumentError when string passed to String#crypt contains null https://bugs.ruby-lang.org/issues/10988 * Author: Jan Rusnacko * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.3.0dev * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Currently String#crypt assumes that it is called on a password typed by the user, specifically, that it does not contain null character. When it does: "abc\0def".crypt("pass") == "abc".crypt("pass") => true This may not be desirable, and developers invoking crypt on strings that potentially include null may expect different results. To prevent security failures, this patch changes String#crypt to throw ArgumentError when invoked on String that includes null character. https://www.reddit.com/r/netsec/comments/2yugos/null_bytes_bcrypt_problem/ Also PR: https://github.com/ruby/ruby/pull/853 ---Files-------------------------------- 0001-Raise-ArgumentError-when-string-passed-to-String-cry.patch (1.87 KB) -- https://bugs.ruby-lang.org/