Sanman Pradhan
25dd70a03b
hwmon: (pmbus/q54sj108a2) fix stack overflow in debugfs read
...
The q54sj108a2_debugfs_read function suffers from a stack buffer overflow
due to incorrect arguments passed to bin2hex(). The function currently
passes 'data' as the destination and 'data_char' as the source.
Because bin2hex() converts each input byte into two hex characters, a
32-byte block read results in 64 bytes of output. Since 'data' is only
34 bytes (I2C_SMBUS_BLOCK_MAX + 2), this writes 30 bytes past the end
of the buffer onto the stack.
Additionally, the arguments were swapped: it was reading from the
zero-initialized 'data_char' and writing to 'data', resulting in
all-zero output regardless of the actual I2C read.
Fix this by:
1. Expanding 'data_char' to 66 bytes to safely hold the hex output.
2. Correcting the bin2hex() argument order and using the actual read count.
3. Using a pointer to select the correct output buffer for the final
simple_read_from_buffer call.
Fixes: d014538aa3 ("hwmon: (pmbus) Driver for Delta power supplies Q54SJ108A2")
Cc: stable@vger.kernel.org
Signed-off-by: Sanman Pradhan <psanman@juniper.net >
Link: https://lore.kernel.org/r/20260304235116.1045-1-sanman.p211993@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net >
2026-03-04 16:48:06 -08:00
..
2026-02-04 14:40:36 -08:00
2025-10-17 07:18:06 -07:00
2026-03-04 16:48:06 -08:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2026-02-22 08:26:33 -08:00
2025-03-02 08:42:01 -08:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-07-07 07:48:25 -07:00
2023-06-08 06:41:17 -07:00
2025-11-26 07:50:13 -08:00
2025-11-26 07:48:31 -08:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2025-10-15 11:02:43 -07:00
2024-06-08 16:07:32 -07:00
2025-10-17 07:18:06 -07:00
2024-10-02 17:23:23 -04:00
2025-10-16 13:46:06 -07:00
2025-10-17 07:17:48 -07:00
2024-05-01 07:47:49 -07:00
2024-07-31 10:43:51 -07:00
2025-07-20 16:38:34 -07:00
2026-02-22 15:48:30 -08:00
2025-07-20 16:38:34 -07:00
2026-02-21 17:09:51 -08:00
2025-10-17 07:18:15 -07:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2023-06-08 06:41:17 -07:00
2025-11-21 11:20:59 -08:00
2024-08-27 08:11:15 -07:00
2025-01-12 08:46:23 -08:00
2025-10-17 07:18:15 -07:00
2023-09-29 14:48:31 -07:00
2026-01-31 07:38:31 -08:00
2024-05-01 07:47:49 -07:00
2025-06-30 17:57:15 -07:00
2023-08-21 06:04:29 -07:00
2025-10-19 18:56:14 -07:00
2025-10-17 07:18:15 -07:00
2026-02-22 08:26:33 -08:00
2025-11-13 12:23:26 -08:00
2025-10-17 07:18:15 -07:00
2026-02-07 09:32:20 -08:00
2024-11-10 14:48:07 -08:00
2026-01-31 07:38:31 -08:00
2024-11-10 14:48:07 -08:00
2026-02-21 17:09:51 -08:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2025-10-15 11:02:43 -07:00
2025-11-24 11:45:16 -08:00
2026-01-31 07:38:32 -08:00
2024-11-10 14:48:07 -08:00
2026-01-31 07:38:32 -08:00
2024-06-08 16:07:32 -07:00
2026-01-31 07:38:31 -08:00
2026-02-21 17:09:51 -08:00
2025-10-17 05:59:13 -07:00
2024-05-01 07:47:49 -07:00
2024-07-09 15:45:48 -07:00
2024-10-02 17:23:23 -04:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2026-01-31 07:38:32 -08:00
2026-02-02 09:00:28 -08:00
2025-07-20 16:37:09 -07:00
2023-08-21 06:04:29 -07:00
2024-05-01 07:47:49 -07:00
2025-02-24 13:19:12 +02:00
2025-10-17 05:59:12 -07:00
2025-03-18 08:03:40 -07:00
2025-05-02 10:23:47 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2025-10-17 07:18:15 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2023-09-29 14:48:31 -07:00
2024-07-19 15:55:08 -07:00
2025-10-17 05:59:12 -07:00
2024-05-01 07:47:49 -07:00
2025-10-17 05:59:13 -07:00
2025-10-17 05:59:12 -07:00
2024-12-02 11:34:44 -08:00
2025-05-19 21:56:18 -07:00
2026-02-24 07:31:35 -08:00
2025-10-15 11:02:43 -07:00
2023-04-19 07:08:36 -07:00
2025-11-18 18:46:21 -08:00
2025-04-23 07:18:27 -07:00
2026-02-24 07:25:26 -08:00
2025-05-12 18:05:54 -07:00
2023-08-21 06:04:29 -07:00
2025-09-07 16:33:47 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:32 -07:00
2024-06-08 16:07:32 -07:00
2024-05-01 07:47:49 -07:00
2025-12-02 17:33:02 +01:00
2024-05-01 07:47:49 -07:00
2025-11-26 09:03:56 -08:00
2023-06-08 06:41:17 -07:00
2024-06-08 16:07:33 -07:00
2024-06-08 16:07:33 -07:00
2025-11-26 07:47:25 -08:00
2025-10-15 11:02:43 -07:00
2025-10-17 05:59:12 -07:00
2024-05-01 07:47:49 -07:00
2025-10-17 05:59:12 -07:00
2025-10-17 05:59:13 -07:00
2025-10-15 11:02:43 -07:00
2025-10-17 07:18:10 -07:00
2024-05-01 07:47:49 -07:00
2025-10-17 07:18:02 -07:00
2024-05-01 07:47:49 -07:00
2022-09-25 14:22:12 -07:00
2024-05-01 07:47:49 -07:00
2025-01-15 13:52:43 -08:00
2025-08-07 10:07:06 +02:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2025-10-15 11:02:43 -07:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2025-12-19 08:44:22 -08:00
2023-08-21 06:04:29 -07:00
2026-02-22 15:48:30 -08:00
2026-02-24 07:25:26 -08:00
2025-10-17 05:59:12 -07:00
2024-11-10 14:48:07 -08:00
2023-05-26 13:33:05 +02:00
2024-07-31 10:43:53 -07:00
2024-07-31 10:43:53 -07:00
2025-10-15 11:02:43 -07:00
2024-05-09 12:56:06 -07:00
2026-03-04 13:57:15 -08:00
2023-12-11 06:20:28 -08:00
2025-11-27 08:08:25 -08:00
2026-02-07 09:33:00 -08:00
2022-09-25 14:22:12 -07:00
2024-05-01 07:47:49 -07:00
2024-02-25 12:37:36 -08:00
2025-10-15 11:02:43 -07:00
2025-10-15 11:02:43 -07:00
2025-04-23 07:21:15 -07:00
2025-07-24 09:20:39 +02:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:07 -08:00
2024-06-08 16:07:33 -07:00
2025-09-25 08:08:14 -07:00
2025-10-17 05:59:12 -07:00
2026-01-31 07:38:32 -08:00
2025-09-16 14:41:57 +01:00
2026-02-07 09:33:00 -08:00
2024-12-02 11:34:44 -08:00
2026-01-31 07:38:31 -08:00
2024-06-11 07:25:13 -07:00
2026-01-31 07:38:32 -08:00
2024-08-27 08:11:15 -07:00
2025-10-15 11:02:43 -07:00
2025-10-17 07:18:15 -07:00
2023-08-21 06:04:31 -07:00
2025-10-15 11:02:42 -07:00
2024-11-10 14:48:06 -08:00
2024-10-02 17:23:23 -04:00
2025-09-07 16:35:18 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2024-11-10 14:48:06 -08:00
2025-10-17 05:59:12 -07:00
2025-03-05 21:17:56 -08:00
2025-09-07 16:33:48 -07:00
2025-04-23 07:18:26 -07:00
2024-12-14 08:00:44 -08:00
2025-10-17 05:59:12 -07:00
2026-02-21 17:09:51 -08:00
2024-08-27 08:10:23 -07:00
2024-02-25 12:37:36 -08:00
2024-11-10 14:48:07 -08:00
2025-10-15 11:04:40 -07:00
2023-08-21 06:04:29 -07:00
2025-10-17 07:18:10 -07:00
2025-02-06 18:51:18 -08:00
2026-01-31 07:38:31 -08:00
2025-10-17 05:59:12 -07:00
2024-11-10 14:48:07 -08:00
2025-09-09 05:26:11 -07:00
2024-07-15 17:39:13 -07:00
2024-11-10 14:48:07 -08:00
2024-11-10 14:48:06 -08:00
2023-04-19 07:08:38 -07:00
2024-11-10 14:48:07 -08:00
2024-05-01 07:47:49 -07:00
2023-04-19 07:08:38 -07:00
2025-04-23 07:18:27 -07:00
2024-08-27 08:10:23 -07:00
2024-11-10 14:48:06 -08:00
2024-08-27 08:10:23 -07:00
2025-11-26 09:03:15 -08:00
2024-05-01 07:47:49 -07:00
2024-05-01 07:47:49 -07:00
2024-06-08 16:07:33 -07:00
2025-10-15 11:02:43 -07:00
2025-10-15 11:02:43 -07:00
2026-01-31 07:38:33 -08:00
2025-12-14 09:52:28 -08:00
2025-11-13 12:23:19 -08:00
2025-10-15 11:02:43 -07:00
2025-01-14 15:42:16 -08:00
2025-02-02 17:34:06 -08:00
2025-11-12 12:09:08 -08:00
2024-11-10 14:48:07 -08:00
2024-08-27 08:10:11 -07:00
2024-11-10 14:48:07 -08:00
2026-02-21 17:09:51 -08:00
2025-11-21 07:50:18 -08:00
2025-11-24 11:47:45 -08:00
2024-05-01 07:47:49 -07:00
2025-11-28 08:30:24 -08:00
2025-07-20 16:38:34 -07:00
2024-11-10 14:48:07 -08:00
2024-02-11 13:43:08 -08:00
2025-11-26 09:04:42 -08:00
2025-12-07 14:10:18 -08:00
2024-05-01 07:47:49 -07:00
2026-02-21 17:09:51 -08:00
2024-06-08 16:07:33 -07:00
2025-04-23 07:18:27 -07:00