Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1olcn6-0003Am-2O for mharc-grub-devel@gnu.org; Thu, 20 Oct 2022 17:09:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olcn4-00038l-VC for grub-devel@gnu.org; Thu, 20 Oct 2022 17:09:22 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olcn2-0002P2-UV for grub-devel@gnu.org; Thu, 20 Oct 2022 17:09:22 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29KKaUtG019176 for ; Thu, 20 Oct 2022 21:09:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2022-7-12; bh=cN0T2iCKREu7Fp1919BAyXkHbKPSSOEp53qtxbb5rzU=; b=dFGdFp4p5Dnajp53dQwlgzcyu43vQaGqYGFG3Uia04rUyQEcA5JZ655BZz+WvSibqYWk LSawGhYNRaqXjjV8PZBoz/z5oiiEbvNvlKu8syB4eaVX+FAv0T1guCvArecFEFFJfiiQ 6R0chpMIr2xCoxM4wJsuiu4MvLbYsuwdP1BrjtWuP9gThcHBrNNYzP+Y1lOrGBrIIYAD zxWZTTClGoDqAvmOlRk/yNdPsn1SbKdU+FV6fFNyBpbxA8WvtVQdPUQWcO/YBM5nFiQX fp8InRvCIAi6VFyVHZ4HlztxZtivBOGN3BhSox4n+4zSlw3SYBE2opjeYlaa21VH+/9z 2g== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3k7ndtqbf6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 20 Oct 2022 21:09:18 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 29KIEjhx014740 for ; Thu, 20 Oct 2022 21:09:11 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3k8hu950gv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 20 Oct 2022 21:09:11 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29KL9AXg015829 for ; Thu, 20 Oct 2022 21:09:10 GMT Received: from localhost (dhcp-10-152-14-18.usdhcp.oraclecorp.com [10.152.14.18]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3k8hu950gh-1; Thu, 20 Oct 2022 21:09:10 +0000 From: Alec Brown To: grub-devel@gnu.org Cc: daniel.kiper@oracle.com, alec.r.brown@oracle.com, darren.kenny@oracle.com Subject: [PATCH 0/2] Fix Coverity untrusted loop bound bugs in jpeg.c Date: Thu, 20 Oct 2022 17:11:12 -0400 Message-Id: <1666300274-2151-1-git-send-email-alec.r.brown@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-20_11,2022-10-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=232 malwarescore=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210200132 X-Proofpoint-ORIG-GUID: 3ZpwYgJK4Cz3itz27HNDfekL2sPgTY0l X-Proofpoint-GUID: 3ZpwYgJK4Cz3itz27HNDfekL2sPgTY0l Received-SPF: pass client-ip=205.220.165.32; envelope-from=alec.r.brown@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2022 21:09:23 -0000 In grub-core/video/readers/jpeg.c, Coverity identified an untrusted loop bound bug. After resolving this bug, a private Coverity scan identified another untrusted loop bound bug in a different function. Since this bug only shows up after resolving the first bug, there isn't a CID for the second bug. The Coverity bugs being addressed are: CID 292450 Alec Brown (2): video/readers: Add artificial limit to image dimensions video/readers/jpeg: Check next_marker is within file size docs/grub.texi | 3 ++- grub-core/video/readers/jpeg.c | 12 +++++++++++- grub-core/video/readers/png.c | 6 +++++- grub-core/video/readers/tga.c | 7 +++++++ include/grub/bitmap.h | 2 ++ 5 files changed, 27 insertions(+), 3 deletions(-)