diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-23 13:16:03 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-23 13:16:03 +0200 |
| commit | df1aa5b0d1a69b93d1371063299e42dcc56cbe7b (patch) | |
| tree | 8e84f62c45a49099782d0a97f5568b9a43702272 /drivers/android/binder.c | |
| parent | ebbc1a4789c666846b9854ef845a37a64879e5f9 (diff) | |
| parent | ed30a4a51bb196781c8058073ea720133a65596f (diff) | |
| download | linux-df1aa5b0d1a69b93d1371063299e42dcc56cbe7b.tar.gz linux-df1aa5b0d1a69b93d1371063299e42dcc56cbe7b.tar.bz2 linux-df1aa5b0d1a69b93d1371063299e42dcc56cbe7b.zip | |
Merge 6.9-rc5 into char-misc-next
We need the char/misc fixes in here as well to work off of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder.c')
| -rw-r--r-- | drivers/android/binder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index bad28cf42010..dd6923d37931 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -1708,8 +1708,10 @@ static size_t binder_get_object(struct binder_proc *proc, size_t object_size = 0; read_size = min_t(size_t, sizeof(*object), buffer->data_size - offset); - if (offset > buffer->data_size || read_size < sizeof(*hdr)) + if (offset > buffer->data_size || read_size < sizeof(*hdr) || + !IS_ALIGNED(offset, sizeof(u32))) return 0; + if (u) { if (copy_from_user(object, u + offset, read_size)) return 0; |
