在提交 Issue 前请确保您已经完成了以下检查:

  1. 您已经搜索了 Issues 列表,但没有找到与您的问题相关的内容。
  2. 如果修复失败或刷入新的 boot.img 后镜像无法启动,请前往 KernelPatch 提问。
  3. 您将上传 Bug Report 文件,路径为 APatch 管理器 > 设置 > 发送日志。
  4. 您知道如何重新复现这个问题,即使它可能不是特定于您的设备。

版本要求:

  • 您正在使用最新 CI 版本的 APatch Manager。

Bug 描述:
在内核中打印了以下信息:

[  503.039639] hook_chain_0 after_recvfrom copy_user_size 2 len:392
[  503.039641] hook_chain_0 after_recvfrom:前8字节 50 00 00 00 00 00 00 00

应用程序打印了:

len 392  body 前8字节 : 50 00 00 00 14 00 02 00

相关的代码片段如下:

void after_recvfrom(hook_fargs6_t *args, void *udata)
{
    char* buf1 = (char*)syscall_argn(args, 1);
    int len = args->ret;
    if(len < 0 ){
        return;
    }
    char buf[len];
    long copy_user_size = compat_strncpy_from_user(buf, buf1, len);
    pr_info("hook_chain_0 after_recvfromyy copy_user_size %d len:%d ", copy_user_size, len);
    pr_info("hook_chain_0 after_recvfromyy:%02x %02x %02x %02x %02x %02x %02x %02x  \n", buf[0],buf[1],buf[2],buf[3],buf[4],buf[5],buf[6],buf[7]);
}
err = fp_hook_syscalln(__NR_recvfrom, 6, 0, after_recvfrom, 0);

复现方法:

  • 上面的日志。

预期行为:

  • 可以获取用户空间正常的数据。

实际行为:

  • 内核获取的用户空间数据与用户空间数据不对应。

截图:

  • 无响应

日志:

  • 无响应

设备名称:

  • pixel 7

系统版本:

  • android 15

APatch 版本:

  • 11142

内核版本:

  • 6.1.99

KernelPatch 版本:

  • 0.12.2

其他信息:

请确保在提交 Issue 时提供以上所有信息,以便我们更好地理解和解决问题。