From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id EFDEC4DAD1 for ; Fri, 23 Jan 2026 02:49:30 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'gLwttkAKY4lxewAUxoxFh0C1VUDMZIs5gOwEepECb7Q=', expected b'Fq2NM105h2JkSRDzRCGrLdFeqYFtoIGm0Rog0emfIV0=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1769136560; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=gLwttkAKY4lxewAUxoxFh0C1VUDMZIs5gOwEepECb7Q=; b=2WAMNMaDgkTZL6EJV8bf5q3vCWBzbQVmElX/covxzvv/e6BtflSbCFGPx+FLNHDDG6wzj sfSeVt7M+e/ur/XprYxrf4YUk1NXD8vLCzxgFxTmuCCwTnhEI+gsFUumHRWGUrQrR0UGfQW W7Uk8SZzxgvYs2U1UTyR+L+N1zXJVZI8kpKnndyG1qvw2AQNULDPO2ZAm3wyW8mCak97bg/ iNxHujSxdnni2tiJWrALQjl7ZYwhvISeHGRTLWY9G4ewPKphc9yuBDYOgJB2xRbkav9oynO 927sCqTWPvdwzfy7PynzoYokcUUpmRJ5TEPKE+3OE68ig1eciORua62CZ1Dg== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7A2F8691204; Fri, 23 Jan 2026 04:49:20 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1769136545; b=lwCNgJW505ZoBn/ycKRi4hBxxxzw3BwffNt90zdiq46jVOi7PZ6Dcc2tExt4wnKc70xFA 8FjWCHyQ50yDenqGpUWYY798qwDAtZulCCb0VnWAkwoGo+mTuoFFxYcaiRvwTamDPkQua86 GDGbvwiR+Q9bU19bZdaV2RGJXdiWMl8DmnYeZCTpnCpCxsEPMIyFpAjhlCT0Opdubf0pBg6 Zml18V90RJRLiP5HGyo5YQs0NMquHq6K5YJxX4i/ZdSmUecULPRBps5GMQ2Ck8OfjIiHRuK 9BvCXXGrotJZ+1IMmFszWDBV6YYO8Pb80rU6wgSzCbzs7LNbW/bCxmqpGPQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1769136545; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=CfZmIFyqpp9Q9k0cxhngWJp15lAqOlHAO1DFJYzm+a8=; b=MwRgWG3itoBB2d9zMGAsr+Myi0LKX4wQRFf/GXrpHpRnt5aP0HHBaZT6JMzXG7iUpS9j+ AKh73i88CaVvlGSJ8Kc2Zkbfurpgf6deBUqWUP6G48UG9c6+w8mVPhJKHQQ208kPz9LBw8K vyh/dR8LBPH/0hVAWsOii1U6nf+VWcUyB1fa6/jSjnxcYg+QX6dsnZXaBfCt/9q9HLraXg6 EXg/+SdPvCLU8yexR3SENgjLoMpNbn9iHa3RLlR/RXSZH/XQ+BbNx7Ea5ZjWhiA7dql//+Q 0rujs9crcnzEckKRte1q8q8Y4wcnSxOMafl2GkP/a9i45UxKm2BKD2eTX7mQ== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1769136538; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=Fq2NM105h2JkSRDzRCGrLdFeqYFtoIGm0Rog0emfIV0=; b=3c1b8mouPXCfSFBDDIi5C05yaJc7QZCMWIr3AhjbQs+92010+q/aUAs2wac6Kht8Jyt8t v9Sm0AuITcta/EU4SFeFAzogHDS74CU0wjo23ArVpex4FOvuw2x2ramQDNyIhE6onvSy4oP 3GcedT6ai5ojYnhlKWbcyeZH3QVsnRO3cNQcWpghQhh7Sj5EDIYwgYVFPtADQ5AAiEpnh8h TTuRMhHoX52vOtBCqfMqd2La4MsQj1yLBfTXxCV0H1TGT3I2yXgeIkuj4GYfTFf6MVEvC/t ycwhtQsf/9P7PgzPOq2ar6x9cezQKltLM6bAOD7SS2+2z4zbioqK6qXj/w7g== Received: from 69dab402ede7 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 011ED690E9D for ; Fri, 23 Jan 2026 04:48:57 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Jan 2026 02:48:57 -0000 Message-ID: <176913653814.25.8582446344140047366@4457048688e7> Message-ID-Hash: WURP2DXUDFQBP7PTMG3KJR53KTQIF5E2 X-Message-ID-Hash: WURP2DXUDFQBP7PTMG3KJR53KTQIF5E2 X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] avformat/img2enc: Check split planes packet size (PR #21551) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: michaelni via ffmpeg-devel Cc: michaelni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21551 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21551 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21551.patch Fixes: out of array read Fixes: VULN-6/poc.raw Found-by: Zhenpeng (Leo) Lin from depthfirst Signed-off-by: Michael Niedermayer >>From a2d94c8f0a569c682fe98eae4d359c0e00155713 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 23 Jan 2026 00:34:56 +0100 Subject: [PATCH] avformat/img2enc: Check split planes packet size Fixes: out of array read Fixes: VULN-6/poc.raw Found-by: Zhenpeng (Leo) Lin from depthfirst Signed-off-by: Michael Niedermayer --- libavformat/img2enc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 62ec5be64b..b11f62d85d 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -217,6 +217,11 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) ysize *= 2; usize *= 2; } + if (ysize + 2*usize + (desc->nb_components > 3) * ysize > pkt->size) { + ret = AVERROR(EINVAL); + goto fail; + } + if ((ret = write_and_close(s, &pb[0], pkt->data , ysize)) < 0 || (ret = write_and_close(s, &pb[1], pkt->data + ysize , usize)) < 0 || (ret = write_and_close(s, &pb[2], pkt->data + ysize + usize, usize)) < 0) -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org