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: <20260209175012.1772804-1-devsec@tpz.ru>
Date: Mon, 9 Feb 2026 17:50:10 +0000
From: Ilya Krutskih <devsec@....ru>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
CC: Ilya Krutskih <devsec@....ru>, <linux-media@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>,
	<lvc-project@...uxtesting.org>
Subject: [PATCH v3] media: dvb: mb86a16: fix array overflow in mb86a16_set_fe()

The size of prev_swp_freq[] is a fixed constant unrelated to
the number of possible detection attempts. Index 'prev_freq_num'
of array 'prev_swp_freq' is incremented by each step in cycle.
If index exceeds the total length of array, an out-of-bounds
access might happen, in case of repeated unsuccessful signal
acquisition. Add check to prevent this.

Cc: stable@...r.kernel.org
Fixes: 41e840b13e11 ("V4L/DVB (13699): [Mantis, MB86A16] Initial checkin: Mantis, MB86A16")
Signed-off-by: Ilya Krutskih <devsec@....ru>
---
v2: Add check for array's length on each cycle step,
edit patch description, edit tag 'fixes'.
https://lore.kernel.org/all/20251211172251.852254-1-devsec@tpz.ru/
v3: Edit condition to >= ARRAY_SIZE(). Move condition at cycle
beginning to prevent border check error.

 drivers/media/dvb-frontends/mb86a16.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/dvb-frontends/mb86a16.c b/drivers/media/dvb-frontends/mb86a16.c
index 9033e39d75f4..5fabb6b884b5 100644
--- a/drivers/media/dvb-frontends/mb86a16.c
+++ b/drivers/media/dvb-frontends/mb86a16.c
@@ -1157,6 +1157,10 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
 		v = 0;
 
 		while (loop == 1) {
+			if (prev_freq_num >= ARRAY_SIZE(prev_swp_freq)) {
+				dprintk(verbose, MB86A16_ERROR, 1, "Signal detection retry attempts failed");
+				return -1;
+			}
 			swp_info_get(state, fOSC_start, state->srate,
 				     v, R, swp_ofs, &fOSC,
 				     &afcex_freq, &AFCEX_L, &AFCEX_H);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ