Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
我对这个boot.img解包提取的kernel进行patch分析,发现在读取banner时出现了segmentfault:
在kallsym.c的函数
find_linux_banner
中读取banner的时候出现内存非法访问了,如下是调试中的日志第一次出现完整的banner
在找到了banner之后,程序继续并没结束查找,继续往下
第二次继续查找
isdigit
检查不满足,继续下一次循环,此时触发内存错误这里可以修改为程序在第一次查找到满足的banner之后就可以停止了,同时也可以检查一下info->banner_num的值
如下是修改后执行的patch日志