lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250829101425.95442-1-tarang.raval@siliconsignals.io>
Date: Fri, 29 Aug 2025 15:44:24 +0530
From: Tarang Raval <tarang.raval@...iconsignals.io>
To: laurent.pinchart@...asonboard.com
Cc: Tarang Raval <tarang.raval@...iconsignals.io>,
	Dafna Hirschfeld <dafna@...tmail.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Heiko Stuebner <heiko@...ech.de>,
	linux-media@...r.kernel.org,
	linux-rockchip@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] media: rkisp1: Fix enum_framesizes accepting invalid pixel formats

Reject unsupported pixel formats in rkisp1_enum_framesizes() to
fix v4l2-compliance failure.

v4l2-compliance test failure:

fail: ../utils/v4l2-compliance/v4l2-test-formats.cpp(403): Accepted framesize for invalid format
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL

Tested on: Debix i.MX8MP Model A
Kernel version: v6.17-rc3
v4l2-compliance: 1.31.0-5387

Signed-off-by: Tarang Raval <tarang.raval@...iconsignals.io>
---
 drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
index 6dcefd144d5a..107937b77153 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
@@ -1383,6 +1383,9 @@ static int rkisp1_enum_framesizes(struct file *file, void *fh,
 	};
 	struct rkisp1_capture *cap = video_drvdata(file);
 
+	if (!rkisp1_find_fmt_cfg(cap, fsize->pixel_format))
+		return -EINVAL;
+
 	if (fsize->index != 0)
 		return -EINVAL;
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ