Gaosheng Cui
bbd0427fc0
audit: fix undefined behavior in bit shift for AUDIT_BIT
...
[ Upstream commit 986d93f55bdeab1cac858d1e47b41fac10b2d7f6 ]
Shifting signed 32-bit value by 31 bits is undefined, so changing
significant bit to unsigned. The UBSAN warning calltrace like below:
UBSAN: shift-out-of-bounds in kernel/auditfilter.c:179:23
left shift of 1 by 31 places cannot be represented in type 'int'
Call Trace:
<TASK>
dump_stack_lvl+0x7d/0xa5
dump_stack+0x15/0x1b
ubsan_epilogue+0xe/0x4e
__ubsan_handle_shift_out_of_bounds+0x1e7/0x20c
audit_register_class+0x9d/0x137
audit_classes_init+0x4d/0xb8
do_one_initcall+0x76/0x430
kernel_init_freeable+0x3b3/0x422
kernel_init+0x24/0x1e0
ret_from_fork+0x1f/0x30
</TASK>
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com >
[PM: remove bad 'Fixes' tag as issue predates git, added in v2.6.6-rc1]
Signed-off-by: Paul Moore <paul@paul-moore.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2022-12-08 11:18:28 +01:00
..
2022-08-25 11:15:11 +02:00
2018-07-30 16:21:49 -04:00
2018-07-23 19:18:10 +01:00
2019-09-19 09:09:29 +02:00
2020-06-07 13:17:54 +02:00
2021-05-22 10:59:43 +02:00
2020-06-25 15:33:10 +02:00
2018-07-19 23:26:01 -07:00
2021-03-24 11:07:35 +01:00
2018-08-06 10:24:33 +02:00
2022-12-08 11:18:28 +01:00
2018-08-22 10:52:49 -07:00
2018-08-11 15:46:41 -06:00
2018-07-09 09:07:52 -06:00
2022-04-15 14:14:59 +02:00
2020-01-27 14:51:14 +01:00
2018-07-27 10:40:16 +02:00
2022-11-25 17:40:16 +01:00
2019-12-31 16:34:57 +01:00
2019-12-17 20:34:59 +01:00
2019-08-06 19:06:52 +02:00
2021-01-06 14:44:59 +01:00
2020-04-13 10:45:03 +02:00
2018-07-29 12:53:54 -07:00
2018-07-12 17:37:13 -07:00
2018-07-19 13:58:44 -07:00
2018-07-04 22:30:28 +09:00
2021-07-20 16:16:01 +02:00
2018-07-15 14:03:06 +02:00
2018-07-15 13:55:47 +02:00
2018-11-13 11:08:46 -08:00
2019-05-25 18:23:40 +02:00
2020-12-30 11:25:48 +01:00
2018-07-29 12:57:26 -07:00
2018-06-29 11:32:55 +09:00
2021-06-30 08:48:21 -04:00
2019-02-27 10:08:58 +01:00
2018-06-27 19:21:25 +02:00
2022-03-08 19:04:09 +01:00
2020-01-14 20:07:01 +01:00
2018-07-29 12:37:06 -07:00
2018-07-26 17:04:37 -07:00
2021-01-06 14:44:59 +01:00
2018-07-07 17:41:38 +02:00
2019-09-16 08:21:47 +02:00
2018-11-21 09:19:23 +01:00
2018-08-06 17:59:22 +02:00
2020-09-23 12:10:59 +02:00
2018-08-03 10:03:57 -07:00
2021-01-06 14:44:59 +01:00
2018-08-02 06:04:57 -04:00
2018-07-27 07:52:39 -04:00
2018-10-05 16:32:04 -07:00
2018-07-24 14:41:08 -07:00
2018-10-05 16:32:04 -07:00
2021-01-06 14:44:59 +01:00
2018-07-13 14:21:16 -07:00
2018-06-20 19:10:06 -06:00
2020-05-27 17:37:39 +02:00
2019-01-09 17:38:36 +01:00
2018-07-29 12:37:06 -07:00
2018-11-27 16:13:01 +01:00
2021-01-06 14:44:59 +01:00
2022-01-05 12:34:59 +01:00
2020-11-05 11:08:51 +01:00
2019-07-21 09:03:02 +02:00
2019-08-16 10:12:45 +02:00
2018-07-08 11:13:25 +09:00
2021-11-26 11:36:18 +01:00
2018-07-19 11:46:57 +01:00
2020-10-30 10:38:26 +01:00
2018-08-07 12:22:15 -07:00
2021-09-22 11:48:14 +02:00
2018-07-31 19:56:42 +10:00
2018-08-11 12:13:49 -07:00
2018-12-05 19:32:04 +01:00
2022-06-25 11:48:59 +02:00
2018-09-02 16:14:44 -07:00
2018-07-10 22:18:52 +02:00
2018-07-23 20:44:12 -07:00
2018-11-23 08:17:06 +01:00
2021-09-22 11:48:04 +02:00
2020-04-02 15:28:16 +02:00
2018-10-05 16:32:04 -07:00
2018-10-07 21:06:28 -07:00
2019-06-17 19:51:56 +02:00
2020-05-02 17:25:48 +02:00
2021-01-06 14:44:59 +01:00
2018-06-18 21:02:52 -04:00
2018-08-01 09:56:10 -07:00
2018-06-24 14:39:46 +02:00
2019-06-04 08:02:33 +02:00
2018-06-30 21:05:42 +09:00
2021-05-22 10:59:31 +02:00
2018-10-08 15:45:18 +01:00
2018-07-27 06:39:57 -04:00
2018-07-04 09:32:22 -04:00
2018-07-24 17:39:28 -04:00
2020-07-22 09:32:09 +02:00
2018-09-03 21:23:24 -07:00
2022-11-03 23:52:32 +09:00
2020-12-02 08:48:07 +01:00
2022-03-08 19:04:07 +01:00