From patchwork Wed Nov 21 20:10:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Lovenberg X-Patchwork-Id: 1782111 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6A3DA3FCA5 for ; Wed, 21 Nov 2012 20:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756151Ab2KUULR (ORCPT ); Wed, 21 Nov 2012 15:11:17 -0500 Received: from mail-qa0-f53.google.com ([209.85.216.53]:54761 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756150Ab2KUULQ (ORCPT ); Wed, 21 Nov 2012 15:11:16 -0500 Received: by mail-qa0-f53.google.com with SMTP id k31so266562qat.19 for ; Wed, 21 Nov 2012 12:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=IjNx8Z2BKI63LhVbhp4iFuQlkG9wg0VoD3V+DVHTasI=; b=AE4giGVHjhcjpGRd4X/q/UIAOpIncPZrSXzC/xj8muVN6ug1WHy8DtH0AM9RvPTmeK d8GFt+VlyxyZZYO1G1pK/C4ykrpppzFkw85k8W0HrrEdCkpzwP6wCZ4/wyy3tVDBJ+y3 j0nonYb+qdQh+Ffm9MMzl6sBUloRmn+fcg8PjGLQwpG+lLC3GLYBOUL3B00sRkx5sbUz Ja/HRKndAB8peMseK9oMV/svJ8y04VEDbPTmiCEume5QaOGq9c3s/5lOHo02OUHnuD59 FC21mmVyBwa9jb8Fzy9As2/0NvM01gNqKQfY77aA6mPg0NJzsoyjbe7CCCC+Ua09Y1zd fkMw== Received: by 10.49.133.195 with SMTP id pe3mr11277967qeb.58.1353528675859; Wed, 21 Nov 2012 12:11:15 -0800 (PST) Received: from localhost.localdomain ([64.9.42.184]) by mx.google.com with ESMTPS id jw1sm608450qeb.13.2012.11.21.12.11.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 12:11:15 -0800 (PST) From: scott.lovenberg@gmail.com To: linux-cifs@vger.kernel.org Cc: jlayton@redhat.com, Scott Lovenberg Subject: [PATCH] CIFS: Fix IP address bounds checking on mount utility. Date: Wed, 21 Nov 2012 15:10:52 -0500 Message-Id: <1353528652-8912-1-git-send-email-scott.lovenberg@gmail.com> X-Mailer: git-send-email 1.7.5.4 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org From: Scott Lovenberg Signed-off-by: Scott Lovenberg --- mount.cifs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mount.cifs.c b/mount.cifs.c index a9632b4..f63c309 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -941,8 +941,8 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info) if (!value || !*value) { fprintf(stderr, "target ip address argument missing\n"); - } else if (strnlen(value, MAX_ADDRESS_LEN) <= - MAX_ADDRESS_LEN) { + } else if (strnlen(value, MAX_ADDR_LIST_LEN + 1) <= + MAX_ADDR_LIST_LEN) { strcpy(parsed_info->addrlist, value); if (parsed_info->verboseflag) fprintf(stderr,