binder: fix BUG_ON found by selinux-testsuite
mainline inclusion from mainline-v5.1-rc3 commit 5997da82 category: bugfix bugzilla: 188431, https://gitee.com/src-openeuler/kernel/issues/I6DKVG CVE: CVE-2023-20938 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5997da82145bb7c9a56d834894cb81f81f219344 -------------------------------- The selinux-testsuite found an issue resulting in a BUG_ON() where a conditional relied on a size_t going negative when checking the validity of a buffer offset. Fixes: 7a67a393 ("binder: add function to copy binder object from buffer") Reported-by:Paul Moore <paul@paul-moore.com> Tested-by:
Paul Moore <paul@paul-moore.com> Signed-off-by:
Todd Kjos <tkjos@google.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Li Huafei <lihuafei1@huawei.com> Reviewed-by:
Zheng Yejian <zhengyejian1@huawei.com> Reviewed-by:
Wang Weiyang <wangweiyang2@huawei.com> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Loading
Please sign in to comment