Loading
net: ll_temac: platform_get_resource replaced by wrong function
stable inclusion from stable-v5.10.215 commit 6d9395ba7f85bdb7af0b93272e537484ecbeff48 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q99Y CVE: CVE-2024-35796 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d9395ba7f85bdb7af0b93272e537484ecbeff48 -------------------------------- commit 3a38a829c8bc27d78552c28e582eb1d885d07d11 upstream. The function platform_get_resource was replaced with devm_platform_ioremap_resource_byname and is called using 0 as name. This eventually ends up in platform_get_resource_byname in the call stack, where it causes a null pointer in strcmp. if (type == resource_type(r) && !strcmp(r->name, name)) It should have been replaced with devm_platform_ioremap_resource. Fixes: bd69058f ("net: ll_temac: Use devm_platform_ioremap_resource_byname()") Signed-off-by:Claus Hansen Ries <chr@terma.com> Cc: stable@vger.kernel.org Reviewed-by:
Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/cca18f9c630a41c18487729770b492bb@terma.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>