* [PATCH] binder: fix handling of misaligned binder object
@ 2019-02-14 23:22 Todd Kjos
2019-02-15 7:48 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Todd Kjos @ 2019-02-14 23:22 UTC (permalink / raw)
To: tkjos, gregkh, arve, devel, linux-kernel, maco
Cc: joel, kernel-team, syzbot+55de1eb4975dec156d8f
Fixes crash found by syzbot:
kernel BUG at drivers/android/binder_alloc.c:LINE! (2)
Reported-by: syzbot+55de1eb4975dec156d8f@syzkaller.appspotmail.com
Signed-off-by: Todd Kjos <tkjos@google.com>
---
Applies to linux-next
drivers/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 2dba539eb792c..8685882da64cd 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2057,7 +2057,7 @@ 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 (read_size < sizeof(*hdr))
+ if (read_size < sizeof(*hdr) || !IS_ALIGNED(offset, sizeof(u32)))
return 0;
binder_alloc_copy_from_buffer(&proc->alloc, object, buffer,
offset, read_size);
--
2.21.0.rc0.258.g878e2cd30e-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] binder: fix handling of misaligned binder object
2019-02-14 23:22 [PATCH] binder: fix handling of misaligned binder object Todd Kjos
@ 2019-02-15 7:48 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-02-15 7:48 UTC (permalink / raw)
To: Todd Kjos
Cc: tkjos, arve, devel, linux-kernel, maco, joel, kernel-team,
syzbot+55de1eb4975dec156d8f
On Thu, Feb 14, 2019 at 03:22:57PM -0800, Todd Kjos wrote:
> Fixes crash found by syzbot:
> kernel BUG at drivers/android/binder_alloc.c:LINE! (2)
>
> Reported-by: syzbot+55de1eb4975dec156d8f@syzkaller.appspotmail.com
As the bot asked, this should be:
Reported-and-tested-by: syzbot+55de1eb4975dec156d8f@syzkaller.appspotmail.com
I'll go fix that up...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-15 7:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14 23:22 [PATCH] binder: fix handling of misaligned binder object Todd Kjos
2019-02-15 7:48 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.