Yajun Deng
de203da734
ntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans
...
There is a kernel API ntb_mw_clear_trans() would pass 0 to both addr and
size. This would make xlate_pos negative.
[ 23.734156] switchtec switchtec0: MW 0: part 0 addr 0x0000000000000000 size 0x0000000000000000
[ 23.734158] ================================================================================
[ 23.734172] UBSAN: shift-out-of-bounds in drivers/ntb/hw/mscc/ntb_hw_switchtec.c:293:7
[ 23.734418] shift exponent -1 is negative
Ensuring xlate_pos is a positive or zero before BIT.
Fixes: 1e2fd202f8 ("ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()")
Signed-off-by: Yajun Deng <yajun.deng@linux.dev >
Reviewed-by: Logan Gunthorpe <logang@deltatee.com >
Signed-off-by: Jon Mason <jdmason@kudzu.us >
2025-03-18 10:22:47 -04:00
..
2025-01-26 17:50:53 -08:00
2025-02-01 09:49:20 -08:00
2025-01-27 16:51:51 -08:00
2025-01-31 11:07:56 -08:00
2025-01-24 08:03:52 -08:00
2025-01-31 15:13:25 -08:00
2025-01-31 11:49:30 -08:00
2025-01-29 15:23:49 -05:00
2025-01-28 12:25:12 -08:00
2025-01-28 13:48:37 +01:00
2025-01-28 13:48:37 +01:00
2025-01-26 18:36:23 -08:00
2025-01-29 10:56:11 +01:00
2025-01-30 15:10:34 -08:00
2025-01-28 12:25:12 -08:00
2025-01-29 11:23:22 -08:00
2025-01-29 14:29:57 -08:00
2025-01-28 12:25:12 -08:00
2025-01-31 09:17:02 -08:00
2025-01-30 10:19:30 -08:00
2025-01-31 15:45:41 -08:00
2025-01-25 16:03:40 -08:00
2025-01-28 13:48:37 +01:00
2025-01-28 12:25:12 -08:00
2025-01-28 09:01:36 -08:00
2025-01-30 17:43:36 -08:00
2025-01-24 15:48:01 -08:00
2025-01-22 11:16:14 -08:00
2025-01-26 17:50:53 -08:00
2025-01-24 07:18:39 -08:00
2025-01-25 09:22:55 -08:00
2025-01-25 18:15:32 +08:00
2025-01-28 12:25:12 -08:00
2025-01-26 18:36:23 -08:00
2025-01-31 11:49:30 -08:00
2025-02-01 09:15:01 -08:00
2025-01-27 16:51:51 -08:00
2025-01-22 09:16:02 -08:00
2025-01-28 13:48:37 +01:00
2025-01-22 10:39:17 -08:00
2025-01-31 11:49:30 -08:00
2025-01-30 12:24:20 -08:00
2025-03-18 10:22:47 -04:00
2025-01-31 07:20:08 -07:00
2025-01-28 12:25:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-27 12:55:12 -06:00
2025-01-28 13:48:37 +01:00
2025-01-29 14:32:38 -08:00
2025-01-24 07:38:50 -08:00
2025-01-27 16:29:16 -08:00
2025-01-27 15:37:16 -08:00
2025-01-30 12:24:20 -08:00
2025-01-28 12:25:12 -08:00
2025-01-29 11:56:55 -08:00
2025-01-24 14:56:59 -08:00
2025-01-30 17:50:02 -08:00
2025-01-30 10:48:17 -08:00
2025-01-31 11:49:30 -08:00
2025-01-28 12:25:12 -08:00
2025-01-25 15:59:46 -08:00
2025-01-29 14:38:19 -08:00
2025-01-24 16:12:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-26 16:12:44 -08:00
2025-01-28 12:25:12 -08:00
2025-01-28 12:25:12 -08:00
2025-01-31 11:49:30 -08:00
2025-01-27 16:51:51 -08:00
2025-01-28 12:25:12 -08:00
2025-01-27 15:26:06 -08:00
2025-01-28 14:16:46 -08:00
2025-01-27 09:39:25 -05:00
2025-01-24 11:32:13 -08:00
2025-01-27 15:26:06 -08:00
2025-01-25 16:19:10 -08:00
2025-01-29 11:39:20 -08:00