Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1ov0GT-0001Rb-K3 for mharc-grub-devel@gnu.org; Tue, 15 Nov 2022 13:02:39 -0500 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 1ov0Fz-0001Kq-61 for grub-devel@gnu.org; Tue, 15 Nov 2022 13:01:59 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ov0Fw-0007Q5-AN for grub-devel@gnu.org; Tue, 15 Nov 2022 13:01:58 -0500 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AFHEvKo003864 for ; Tue, 15 Nov 2022 18:01:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=corp-2022-7-12; bh=LYd72Eu2/rOqE0fn2lzM4xVAn0lKa9c2U3VyF171BOA=; b=AWsKv5ad47ZLzUtZ/MaGpP290q4eXg6Ag2Lm5W4i0oDyGs0fumxvJ6itSxEPlFXzAgOk yc8FfnnenRDUxmA5MPLuX8a7p+WkS+ryqXkeANNqJYV4a4962audewvxhu59oewf4mwR EHfzPcdvBa6KheJ6C47687CEp5snus8a4duNR2+ZdYK3JzNq/n3/JqgtUVEVI7shvTP5 dSf4hbyo62Q1vWA5IjOwgE8WSQixLUPYCJvzHvMvWtRyxJEOs1xH/wqgqkpyobXj76Pi JTmlcZUIMiNNFbYffwVvzKgVKb9/Glr2qi4WUMbfVXMtpPqCGqhQUZOdaGcuXlprGaxW cQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kv3n12cd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 15 Nov 2022 18:01:54 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AFGs7Mh034826 for ; Tue, 15 Nov 2022 18:01:53 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kt1x64phs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 15 Nov 2022 18:01:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KnomrGI+yrJ79XF/KiN5PwUE1wflg5wsXoXQwMFgFIjuKvL8of00kxTKD+B8IVrQIylNQpgdlDcl+J89hihDLd2R90slwJbnpe5INEZfCayh3TzdhjmuLLSFuZ8vW0b3KkhJObPV8m0/xHHWoxcayyayhTEVsCUl3hslnVTnObxaBrpw/SVFbPiRKAJjBWnIkjYGtVUXPZuvCZ/Z2v49yBDhhs2OWj2sgedMaHc0LpoGCCYyJz1sAKHXLHJm1P5fxnMAo5QeAVj/LudWzWYOs0fPXtbedRdoSDhA16759rDZQC5qcazZ6JHbvakUX7NLo6Mks7+ogEqo77i9TCT1lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LYd72Eu2/rOqE0fn2lzM4xVAn0lKa9c2U3VyF171BOA=; b=KWTq/g14p7Fsv9BHzWq2ZIYz2W6nzhxmwG9Xq/t1gVRTzRTlumrI2zRj9G3wIpCXXEzcPCQ16tKThIeB2Dw3vm4HWyg4TFOezcELIijqwhMazeUghi3SGYkxMdn6iJ+mSbK31eFiepHytP4uzfMnrIg2EnSkRXp+TMiJWhQ+Gpdvq5XusWpt8mchtY+e5t8onLLCrY2MxvZCPcx4BHftNAxGP2lNF2KRgwr1pFlzKU/WbF32E1yCMf8xclQuQ+7ublNdSg6wYeOPpy+LNr1Q12xuR2cz8Hg0XWMDMB5KBWqNkzjE7SFvy/kjuV0aYXwwDhdd1zcP1/uWKIjDeye5tA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LYd72Eu2/rOqE0fn2lzM4xVAn0lKa9c2U3VyF171BOA=; b=MIXWOVawmhPAupBVl9sZ58AS5mAQlG0lysScHeCMJlb7lZ90bIvcHcHdKzUcfhlXIsgUOMmH9pPve9hSv2/dOOq7od9PcVnPw3olcf8xmuM5lIDEBS7AzumLEvAaT8Gjis52KqERQNwzikJzLgL8o2Znf4umz9VvRW1l1AfkXSc= Received: from BN0PR10MB4822.namprd10.prod.outlook.com (2603:10b6:408:124::13) by SJ0PR10MB5583.namprd10.prod.outlook.com (2603:10b6:a03:3df::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Tue, 15 Nov 2022 18:01:51 +0000 Received: from BN0PR10MB4822.namprd10.prod.outlook.com ([fe80::57f4:23ef:5614:96a0]) by BN0PR10MB4822.namprd10.prod.outlook.com ([fe80::57f4:23ef:5614:96a0%2]) with mapi id 15.20.5813.018; Tue, 15 Nov 2022 18:01:51 +0000 From: Daniel Kiper To: grub-devel@gnu.org Subject: [SECURITY PATCH 10/13] font: Fix an integer underflow in blit_comb() Date: Tue, 15 Nov 2022 19:01:07 +0100 Message-Id: <20221115180110.26303-10-daniel.kiper@oracle.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Content-Type: text/plain X-ClientProxiedBy: BE0P281CA0005.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:a::15) To BN0PR10MB4822.namprd10.prod.outlook.com (2603:10b6:408:124::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN0PR10MB4822:EE_|SJ0PR10MB5583:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f1d2ba8-49a1-42ac-8574-08dac7337912 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Kn45Vc5wpu/M6wxmVLcr3GN4V+HR6+CO5N6dw6KKbBfy8Er6V1lUVhdU6AC6tz1ZluE7jc357r3V0ePH6WqEVqtnhFj3+Y/6zUQ94DqkalctcP7MvP7asWHIoE0dEKw8lOOVONhFEo2P13P7CmdqhtpS11yW0czsZRO0P3cBJCrMK3TReX4pjXKBlse5SSL2Ikgw4j2wVS27wwEMVUS6qrwk+RUHdVBq1pdmXh7ieiIXel0qhlPPo/Y8mQ4K1Mvd99PXDf4KJp8zBw5wm1xhjlfo8lqnGSZd0oO/WSXLXzVu2w0mfcM4xlQ7LMs1C+edhrO2s30Tb/NWWe18O04UIfrp2irz8z7A14EkYUPXv6+Puo+sOeDZpZL+xKlutyeRLC29dZ1uSo9TQ8l4JrYrQ5n69gixv47VYYPO19HyqGUzVG7zVusY/3IanfSaMObQRQogXGTiC/lkUPY1Vcb+jOhMY7Aq3RCQSOUrpeWwfM1hHtDk9ICQ6/lB00PRRTEfu1NRQRWk0LN5oMQOx8PLNNlnXrEJXq4DJm+YzWDlhrcTdcuaOaQwQD+rH8sm5/e6of/6F81oHsySCTRd7mMtQjh0wXqyocPnSoXk2YExLyjrsXgVJxYvjyOECC6MEyglzG7k0uEOLBMSYnBpmq8hGMwB1A9B79LFeg8LExXNMDpR7wPFsipIRREOekuDOcqgbZELu61eqSYq4Y634lZWQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN0PR10MB4822.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(366004)(346002)(376002)(136003)(39860400002)(451199015)(2906002)(44832011)(66946007)(66476007)(66556008)(5660300002)(8936002)(8676002)(41300700001)(6666004)(6486002)(83380400001)(2616005)(36756003)(6512007)(26005)(316002)(6916009)(1076003)(186003)(478600001)(6506007)(86362001)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Fdnh/nL8HTu/wZGN6BT5Ol4pglCS14EET2OYPxrpz0hIGxVjXqt7hBpA5OMI?= =?us-ascii?Q?hY2L7D8I4iO1d+QZXkTdNRBHgjK3GWcebwgmh2wZnxaetyfun54ia20jm0ZF?= =?us-ascii?Q?mK3Jg1QTJSlOEBA4eUs1yqswVeTWGV4oqnCCErZUqCYMVakodyk6NMnXaeFv?= =?us-ascii?Q?t2SKqH8a0exj5L5gy/kUf6hIi6Yw9lNX6qIbX5ZPWRASgJ0vU8FuOowwO2qm?= =?us-ascii?Q?Hf2tzZ/binuGwNlgjmHExoHX8togrNQnthLFbCfHgDEnXyzBlDRUq9Bpj1cL?= =?us-ascii?Q?wzdNS2hy9H5vmxqt/MlSxqKLSB9hqXkE2dk0AaHpduOV+MyavY0x2WyKanCr?= =?us-ascii?Q?slDsQ/X45sfwwFxLk3ClEKcNpGtudot2knIl59/xF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ML7Gl5hSQ9vE1O4xkyPPa446XMw/zDAS/PH+NNt0octSlh90e3sxEYdO30Gr0av/m7wCtcDcNMixNkc7FeQrQr+vl+phP3Fly92BZe7ziWjdQz4w0TKSLsn8Z3FYW+mz58CW6S5XLri/Nu50jd0xn+ZdXCmxq5HatT/AfE7QjFJ X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f1d2ba8-49a1-42ac-8574-08dac7337912 X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB4822.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2022 18:01:51.5644 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f6LNGmi4mFxnRkypnl40t5ki0PaCSTBNpsx+dWAmXOaPoWP4XELVdtgcE8epkMlhFYe/t+CRCUgi27JnNDqjlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5583 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-15_08,2022-11-15_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211150122 X-Proofpoint-GUID: CcbC7xP_xzUX05LjFzPmrz62P1Geue9n X-Proofpoint-ORIG-GUID: CcbC7xP_xzUX05LjFzPmrz62P1Geue9n Received-SPF: pass client-ip=205.220.177.32; envelope-from=daniel.kiper@oracle.com; helo=mx0b-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, 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: Tue, 15 Nov 2022 18:01:59 -0000 From: Zhang Boyang The expression (ctx.bounds.height - combining_glyphs[i]->height) / 2 may evaluate to a very big invalid value even if both ctx.bounds.height and combining_glyphs[i]->height are small integers. For example, if ctx.bounds.height is 10 and combining_glyphs[i]->height is 12, this expression evaluates to 2147483647 (expected -1). This is because coordinates are allowed to be negative but ctx.bounds.height is an unsigned int. So, the subtraction operates on unsigned ints and underflows to a very big value. The division makes things even worse. The quotient is still an invalid value even if converted back to int. This patch fixes the problem by casting ctx.bounds.height to int. As a result the subtraction will operate on int and grub_uint16_t which will be promoted to an int. So, the underflow will no longer happen. Other uses of ctx.bounds.height (and ctx.bounds.width) are also casted to int, to ensure coordinates are always calculated on signed integers. Fixes: CVE-2022-3775 Reported-by: Daniel Axtens Signed-off-by: Zhang Boyang Reviewed-by: Daniel Kiper --- grub-core/font/font.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/grub-core/font/font.c b/grub-core/font/font.c index abd412a5e..3d3d803e8 100644 --- a/grub-core/font/font.c +++ b/grub-core/font/font.c @@ -1203,12 +1203,12 @@ blit_comb (const struct grub_unicode_glyph *glyph_id, ctx.bounds.height = main_glyph->height; above_rightx = main_glyph->offset_x + main_glyph->width; - above_righty = ctx.bounds.y + ctx.bounds.height; + above_righty = ctx.bounds.y + (int) ctx.bounds.height; above_leftx = main_glyph->offset_x; - above_lefty = ctx.bounds.y + ctx.bounds.height; + above_lefty = ctx.bounds.y + (int) ctx.bounds.height; - below_rightx = ctx.bounds.x + ctx.bounds.width; + below_rightx = ctx.bounds.x + (int) ctx.bounds.width; below_righty = ctx.bounds.y; comb = grub_unicode_get_comb (glyph_id); @@ -1221,7 +1221,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id, if (!combining_glyphs[i]) continue; - targetx = (ctx.bounds.width - combining_glyphs[i]->width) / 2 + ctx.bounds.x; + targetx = ((int) ctx.bounds.width - combining_glyphs[i]->width) / 2 + ctx.bounds.x; /* CGJ is to avoid diacritics reordering. */ if (comb[i].code == GRUB_UNICODE_COMBINING_GRAPHEME_JOINER) @@ -1231,8 +1231,8 @@ blit_comb (const struct grub_unicode_glyph *glyph_id, case GRUB_UNICODE_COMB_OVERLAY: do_blit (combining_glyphs[i], targetx, - (ctx.bounds.height - combining_glyphs[i]->height) / 2 - - (ctx.bounds.height + ctx.bounds.y), &ctx); + ((int) ctx.bounds.height - combining_glyphs[i]->height) / 2 + - ((int) ctx.bounds.height + ctx.bounds.y), &ctx); if (min_devwidth < combining_glyphs[i]->width) min_devwidth = combining_glyphs[i]->width; break; @@ -1305,7 +1305,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id, /* Fallthrough. */ case GRUB_UNICODE_STACK_ATTACHED_ABOVE: do_blit (combining_glyphs[i], targetx, - -(ctx.bounds.height + ctx.bounds.y + space + -((int) ctx.bounds.height + ctx.bounds.y + space + combining_glyphs[i]->height), &ctx); if (min_devwidth < combining_glyphs[i]->width) min_devwidth = combining_glyphs[i]->width; @@ -1313,7 +1313,7 @@ blit_comb (const struct grub_unicode_glyph *glyph_id, case GRUB_UNICODE_COMB_HEBREW_DAGESH: do_blit (combining_glyphs[i], targetx, - -(ctx.bounds.height / 2 + ctx.bounds.y + -((int) ctx.bounds.height / 2 + ctx.bounds.y + combining_glyphs[i]->height / 2), &ctx); if (min_devwidth < combining_glyphs[i]->width) min_devwidth = combining_glyphs[i]->width; -- 2.11.0