android_kernel_msm-6.1_noth.../drivers/android
Carlos Llamas 0c9784b747 FROMLIST: binder: check offset alignment in binder_get_object()
Commit 6d98eb95b4 ("binder: avoid potential data leakage when copying
txn") introduced changes to how binder objects are copied. In doing so,
it unintentionally removed an offset alignment check done through calls
to binder_alloc_copy_from_buffer() -> check_buffer().

These calls were replaced in binder_get_object() with copy_from_user(),
so now an explicit offset alignment check is needed here. This avoids
later complications when unwinding the objects gets harder.

It is worth noting this check existed prior to commit 7a67a39320
("binder: add function to copy binder object from buffer"), likely
removed due to redundancy at the time.

Fixes: 6d98eb95b4 ("binder: avoid potential data leakage when copying txn")
Cc:  <stable@vger.kernel.org>
Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>

Bug: 320661088
Link: https://lore.kernel.org/all/20240330190115.1877819-1-cmllamas@google.com/
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Iaddabaa28de7ba7b7d35dbb639d38ca79dbc5077
2024-04-01 18:17:15 +00:00
..
android_debug_symbols.c ANDROID: android: Create debug_symbols driver 2023-06-30 10:39:56 +00:00
binder.c FROMLIST: binder: check offset alignment in binder_get_object() 2024-04-01 18:17:15 +00:00
binder_alloc.c ANDROID: vendor_hook: rename the the name of hooks 2024-03-18 18:00:07 +00:00
binder_alloc.h binder: fix memory leak in binder_init() 2023-08-16 18:27:24 +02:00
binder_alloc_selftest.c UPSTREAM: Revert "android: binder: stop saving a pointer to the VMA" 2023-06-14 16:40:59 +00:00
binder_internal.h FROMGIT: Binder: Add async from to transaction record 2023-06-07 14:25:07 +00:00
binder_trace.h Merge 228dfe98a3 ("Merge tag 'char-misc-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mainline 2022-08-21 14:30:36 +02:00
binderfs.c binderfs: rework superblock destruction 2022-09-01 16:18:49 +02:00
debug_kinfo.c ANDROID: kernel: fix debug_kinfo set twice crash issue 2022-05-17 20:48:53 +08:00
debug_kinfo.h ANDROID: debug_kinfo driver, move to drivers/android 2022-04-13 13:42:33 +02:00
Kconfig ANDROID: android: Create debug_symbols driver 2023-06-30 10:39:56 +00:00
Makefile ANDROID: android: Create debug_symbols driver 2023-06-30 10:39:56 +00:00
vendor_hooks.c ANDROID: thermal: Add vendor thermal_pm_notify_suspend function 2024-04-01 06:54:34 +00:00