Anirudh Rayabharam
02625c9652
video: hgafb: correctly handle card detect failure during probe
...
The return value of hga_card_detect() is not properly handled causing
the probe to succeed even though hga_card_detect() failed. Since probe
succeeds, hgafb_open() can be called which will end up operating on an
unmapped hga_vram. This results in an out-of-bounds access as reported
by kernel test robot [1].
To fix this, correctly detect failure of hga_card_detect() by checking
for a non-zero error code.
[1]: https://lore.kernel.org/lkml/20210516150019.GB25903@xsang-OptiPlex-9020/
Fixes: dc13cac4862c ("video: hgafb: fix potential NULL pointer dereference")
Cc: stable <stable@vger.kernel.org>
Reported-by: kernel test robot <oliver.sang@intel.com>
Reviewed-by: Igor Matheus Andrade Torrente <igormtorrente@gmail.com>
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210516192714.25823-1-mail@anirudhrb.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-21 15:04:05 +02:00
..
2021-03-11 11:11:32 +01:00
2021-05-15 08:12:12 -07:00
2020-11-22 22:58:55 +01:00
2020-05-06 19:29:10 +02:00
2020-01-30 08:04:01 -08:00
2020-09-08 13:33:31 +02:00
2021-05-07 00:26:34 -07:00
2020-04-08 12:09:15 +02:00
2020-12-08 18:34:25 +01:00
2020-11-30 20:21:54 +01:00
2021-02-18 15:14:32 +01:00
2021-03-22 15:02:14 +01:00
2020-11-30 20:04:36 +01:00
2020-09-08 13:33:15 +02:00
2020-12-08 18:36:52 +01:00
2020-01-06 09:45:59 +01:00
2020-11-30 20:04:24 +01:00
2020-01-03 14:27:43 +01:00
2021-02-24 13:38:31 -08:00
2019-06-19 17:09:55 +02:00
2021-03-16 17:08:46 +10:00
2021-02-12 10:01:45 +00:00
2020-08-23 17:36:59 -05:00
2020-09-08 13:33:20 +02:00
2019-12-05 10:57:53 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2017-11-02 11:10:55 +01:00
2020-10-28 19:40:11 +01:00
2017-11-02 11:10:55 +01:00
2020-11-17 08:47:15 +01:00
2019-12-05 10:57:53 +02:00
2019-06-03 16:00:08 +02:00
2019-12-05 10:57:53 +02:00
2018-01-04 16:53:49 +01:00
2019-12-05 10:57:53 +02:00
2020-12-08 18:34:08 +01:00
2020-03-09 11:12:19 +01:00
2017-11-02 11:10:55 +01:00
2020-01-30 08:04:01 -08:00
2017-11-02 11:10:55 +01:00
2020-12-08 18:34:08 +01:00
2020-12-08 18:34:08 +01:00
2020-01-15 17:31:50 +01:00
2019-12-05 10:57:53 +02:00
2020-12-05 21:16:02 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-12-08 18:36:36 +01:00
2019-05-30 11:26:32 -07:00
2020-09-08 13:33:16 +02:00
2019-06-19 17:09:55 +02:00
2021-02-12 10:01:45 +00:00
2019-12-05 10:57:53 +02:00
2021-04-26 17:33:03 -04:00
2020-07-20 11:47:29 +02:00
2020-12-08 18:34:08 +01:00
2019-12-05 10:57:53 +02:00
2020-10-17 08:23:14 +02:00
2020-02-19 10:58:22 -08:00
2020-12-08 18:35:24 +01:00
2020-12-08 18:34:50 +01:00
2020-07-20 11:47:29 +02:00
2020-08-23 17:36:59 -05:00
2019-12-05 10:57:53 +02:00
2021-05-21 15:04:05 +02:00
2020-06-09 09:39:13 -07:00
2020-06-17 10:57:41 -07:00
2021-04-26 10:44:16 -07:00
2020-09-08 13:33:17 +02:00
2021-05-13 18:58:39 +02:00
2021-02-12 10:01:45 +00:00
2020-11-27 16:14:02 +01:00
2020-12-08 18:34:08 +01:00
2020-07-20 11:47:29 +02:00
2020-10-15 10:46:16 -07:00
2019-12-05 10:57:53 +02:00
2020-07-20 11:47:29 +02:00
2020-11-30 20:04:56 +01:00
2017-04-20 12:02:32 +01:00
2020-11-30 20:21:08 +01:00
2020-01-03 14:27:49 +01:00
2020-08-23 17:36:59 -05:00
2020-12-08 18:34:08 +01:00
2019-12-05 10:57:53 +02:00
2020-11-30 20:04:43 +01:00
2020-07-16 12:35:15 -07:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-12-04 01:01:22 +11:00
2020-08-05 19:47:22 +02:00
2020-03-18 12:27:03 +01:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2019-08-26 10:02:02 +02:00
2020-06-09 09:39:13 -07:00
2020-11-29 22:51:07 +01:00
2020-08-20 17:48:12 +02:00
2020-08-20 17:48:12 +02:00
2016-08-11 17:54:55 +03:00
2020-12-05 21:01:04 +01:00
2020-09-08 13:33:19 +02:00
2020-08-23 17:36:59 -05:00
2020-04-17 15:50:11 +02:00
2020-09-25 16:34:50 +02:00
2017-11-02 11:10:55 +01:00
2020-01-30 08:04:01 -08:00
2020-11-01 10:29:04 +01:00
2019-06-12 20:28:11 +02:00
2021-01-20 12:06:32 +01:00
2019-12-05 10:57:53 +02:00
2020-08-23 17:36:59 -05:00
2019-04-01 17:46:59 +02:00
2020-09-08 13:33:02 +02:00
2019-12-05 10:57:53 +02:00
2020-09-08 13:33:03 +02:00
2020-11-30 20:04:59 +01:00
2020-10-15 08:12:59 +02:00
2020-08-23 17:36:59 -05:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-12-08 18:34:08 +01:00
2020-11-30 20:04:30 +01:00
2020-11-30 20:04:50 +01:00
2019-12-05 10:57:53 +02:00
2020-01-30 08:04:01 -08:00
2020-12-15 13:44:14 +01:00
2020-12-08 18:33:48 +01:00
2020-05-06 21:04:45 +02:00
2019-05-30 11:26:32 -07:00
2020-04-17 15:50:14 +02:00
2019-12-05 10:57:53 +02:00
2021-05-07 00:26:34 -07:00
2020-04-17 15:50:08 +02:00
2019-06-05 17:36:37 +02:00
2020-09-08 13:33:18 +02:00
2020-05-06 20:22:25 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2020-03-02 16:32:04 +01:00
2020-12-08 18:34:36 +01:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2021-02-12 10:01:45 +00:00