Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2460480imd; Fri, 2 Nov 2018 11:47:45 -0700 (PDT) X-Google-Smtp-Source: AJdET5dEulE0Z4FjNJ6eF2ARgs4y7uZiEXlskXH79onvxifj8lFZO+QR/WwWm579frscwAApTsxA X-Received: by 2002:a17:902:8543:: with SMTP id d3-v6mr4894175plo.313.1541184465588; Fri, 02 Nov 2018 11:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184465; cv=none; d=google.com; s=arc-20160816; b=St34Jaw1V2ZyGrAWJOrLMhy6tCwFbcZuOCxo0NCVo9tbRm1rs5is778f4Zdz9cfAcn KD82vUFwWga1leasqy4tWlwRuIsZU6svKAqS78ZZ5cKImfWbGeBRAVMAaGgpv84EnSkm /cVnCfQsezA6StlysZ7EtSI3ehxKnGDR14iTAycg/CzM8BkSYh7AxvfGWZzRs4vUSt4f PxqoOeCCOyKvZaFYDttnXp1/3TEeaj9v2y1yPx67AdSGpfM4fK1055CWKoFGfz5jq+vJ 40FH7N+RVGPIQFEc3SB2jG2C8qXb6sjRnqcJLc6+usFgOOyFBtgfxeaBnlocOWdvCEnQ 9Uew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n+o46Awu3l3LmkXMg02kztXdNy+7ZsME07I3UkvLz8s=; b=SEr08rCH9JcfB/KN4IqhPnvJnF97CA5yu6bR/04pXi8V8eAshw3Xvj2CJngvUI9zE3 r5e7XyK9+JcOGdGbuGzziG9I7JQvFTQNjqfGZxWcE5ooJPXCgP7wiS6Bk0oFlP81zfIY Sov6KH/lOvbG324yYPyrTg3Gf0RgLEa2oVS7HfK3uV93vxs4qYzxdyy0SlfUgKptHgc1 VPHT4ArS6Ei+pc8OHKxc7/RlpkLKddMSDPD2CGqDcs5HO8/NNiEPqgLLnO8cmREZUxTK UHCl9NN7SE1xmj7eK7umPiRyvj/+zV9Dkj0ZcFQgb++hf3b/T6DwgQrALoG2eBS7h458 G3aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vidUwg8A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t69si4577023pgb.365.2018.11.02.11.47.31; Fri, 02 Nov 2018 11:47:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vidUwg8A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730168AbeKCDx0 (ORCPT + 99 others); Fri, 2 Nov 2018 23:53:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:49038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728985AbeKCDxZ (ORCPT ); Fri, 2 Nov 2018 23:53:25 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 566982084A; Fri, 2 Nov 2018 18:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184312; bh=qguiQZmQO/BOWSpPS27Gg86Ancsl3BS894EzWSjXa3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vidUwg8Ac1jTg+8F/Vgmr2Tyow1ISpgYcFhPkwe+XpOuwz8NFC8ScG92tdoTbssk1 cj2+yEPLs4jOBRvHBHLktIZK0QvyGKQNbJ8nzd49ApLt/G26CFeRbuB3gwKzj/QQMh QfgdzQYDmJQ3x65HAwfymnLSc0gvs/6FwZkiY/XU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xin Long , Marcelo Ricardo Leitner , "David S. Miller" Subject: [PATCH 4.18 132/150] sctp: fix the data size calculation in sctp_data_size Date: Fri, 2 Nov 2018 19:34:54 +0100 Message-Id: <20181102182911.926060233@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xin Long [ Upstream commit 5660b9d9d6a29c2c3cc12f62ae44bfb56b0a15a9 ] sctp data size should be calculated by subtracting data chunk header's length from chunk_hdr->length, not just data header. Fixes: 668c9beb9020 ("sctp: implement assign_number for sctp_stream_interleave") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/net/sctp/sm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -347,7 +347,7 @@ static inline __u16 sctp_data_size(struc __u16 size; size = ntohs(chunk->chunk_hdr->length); - size -= sctp_datahdr_len(&chunk->asoc->stream); + size -= sctp_datachk_len(&chunk->asoc->stream); return size; }