Philipp Stanner
0b364cf53b
vdpa: solidrun: Fix UB bug with devres
...
In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed to
pcim_iomap_regions() is placed on the stack. Neither
pcim_iomap_regions() nor the functions it calls copy that string.
Should the string later ever be used, this, consequently, causes
undefined behavior since the stack frame will by then have disappeared.
Fix the bug by allocating the strings on the heap through
devm_kasprintf().
Cc: stable@vger.kernel.org # v6.3
Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.")
Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Closes: https://lore.kernel.org/all/74e9109a-ac59-49e2-9b1d-d825c9c9f891@wanadoo.fr/
Suggested-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20241028074357.9104-3-pstanner@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-11-06 04:40:07 -05:00
..
2024-10-30 10:17:00 +01:00
2024-10-29 12:56:19 +01:00
2024-09-04 15:01:17 +01:00
2024-09-11 16:02:45 +02:00
2024-10-24 11:14:00 +02:00
2024-10-02 17:23:23 -04:00
2024-11-03 08:51:53 -10:00
2024-09-10 19:52:30 -05:00
2024-10-18 15:53:00 -07:00
2024-10-16 16:10:25 -04:00
2024-09-27 08:48:37 -07:00
2024-10-17 19:47:15 -06:00
2024-10-29 00:46:20 +02:00
2024-10-17 16:24:42 -07:00
2024-09-17 15:27:01 +02:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-15 23:54:15 -05:00
2024-09-18 10:49:45 +02:00
2024-10-16 08:42:54 -07:00
2024-10-25 16:07:03 -05:00
2024-10-09 12:47:19 -07:00
2024-09-05 01:23:56 +09:00
2024-11-03 10:15:50 -10:00
2024-09-19 10:18:15 +02:00
2024-09-16 06:36:37 +02:00
2024-09-26 10:13:08 -07:00
2024-10-27 11:14:35 +09:00
2024-11-01 07:54:11 -10:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-09-27 08:18:43 -07:00
2024-10-31 19:14:17 +01:00
2024-11-02 04:44:27 +10:00
2024-10-02 17:23:23 -04:00
2024-10-24 16:31:58 -07:00
2024-09-19 10:18:15 +02:00
2024-10-14 19:14:08 -07:00
2024-09-27 08:18:43 -07:00
2024-10-05 10:31:04 -07:00
2024-09-17 16:51:45 +02:00
2024-09-25 22:30:33 +02:00
2024-10-24 18:46:04 +01:00
2024-10-21 13:28:15 -03:00
2024-11-03 08:35:29 -10:00
2024-10-15 10:17:54 +02:00
2024-10-27 17:30:16 +01:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-09-27 09:11:05 -05:00
2024-10-27 08:29:36 -10:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-09-29 09:22:34 -07:00
2024-10-02 17:23:23 -04:00
2024-10-29 04:01:40 +01:00
2024-10-11 11:23:21 -07:00
2024-10-02 17:23:23 -04:00
2024-10-31 11:15:43 +01:00
2024-10-02 17:23:23 -04:00
2024-09-20 10:51:25 -04:00
2024-09-26 08:43:17 -07:00
2024-11-01 13:41:55 -10:00
2024-09-26 10:13:08 -07:00
2024-10-10 12:43:01 -05:00
2024-10-02 01:27:50 +02:00
2024-09-09 08:53:17 +02:00
2024-10-13 18:17:35 +02:00
2024-11-01 15:44:23 -10:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-01 02:47:39 -07:00
2024-10-21 23:34:42 +05:30
2024-10-12 22:04:38 +02:00
2024-10-27 08:40:33 -10:00
2024-10-02 12:38:53 +02:00
2024-10-02 17:23:23 -04:00
2024-10-21 13:23:06 +02:00
2024-09-27 08:18:43 -07:00
2024-10-02 17:23:23 -04:00
2024-09-26 12:00:25 -07:00
2024-09-13 19:08:14 +01:00
2024-09-29 09:53:04 -07:00
2024-09-30 14:24:37 +02:00
2024-09-13 14:09:47 -07:00
2024-10-02 17:23:23 -04:00
2024-10-16 11:32:32 +02:00
2024-09-27 08:18:43 -07:00
2024-10-30 08:16:23 -10:00
2024-09-26 17:25:29 +02:00
2024-10-11 10:03:13 +00:00
2024-10-17 12:11:19 +01:00
2024-10-23 22:37:54 +01:00
2024-10-24 18:30:47 +01:00
2024-10-19 12:52:19 -07:00
2024-09-09 12:22:06 +02:00
2024-10-11 11:41:20 -07:00
2024-10-21 09:42:42 +03:00
2024-10-11 08:39:24 +02:00
2024-10-30 08:16:23 -10:00
2024-09-11 16:02:54 +02:00
2024-10-29 04:38:00 +01:00
2024-11-06 04:40:07 -05:00
2024-09-27 08:18:43 -07:00
2024-10-07 11:33:26 -07:00
2024-10-21 11:16:51 +02:00
2024-09-27 08:18:43 -07:00
2024-10-07 11:33:26 -07:00
2024-09-06 19:18:32 +02:00
2024-10-02 17:23:23 -04:00
2024-10-18 11:59:04 +02:00
2024-09-04 17:24:58 -05:00