|
| 1 | +{ |
| 2 | + "id": 14114605, |
| 3 | + "url": "https://patchwork.test/api/1.1/patches/14114605/", |
| 4 | + "web_url": "https://patchwork.test/project/netdevbpf/patch/[email protected]/", |
| 5 | + "project": { |
| 6 | + "id": 399, |
| 7 | + "url": "https://patchwork.test/api/1.1/projects/399/", |
| 8 | + "name": "Netdev + BPF", |
| 9 | + "link_name": "netdevbpf", |
| 10 | + "list_id": "bpf.vger.kernel.org", |
| 11 | + "list_email": "[email protected]", |
| 12 | + "web_url": "", |
| 13 | + "scm_url": "", |
| 14 | + "webscm_url": "" |
| 15 | + }, |
| 16 | + |
| 17 | + "date": "2025-06-11T15:48:58", |
| 18 | + "name": "[bpf-next] bpf: clear user buf when bpf_d_path failed", |
| 19 | + "commit_ref": "3b55a9e6738b7b82a7c57ebaa484aabd0c9d36bd", |
| 20 | + "pull_url": null, |
| 21 | + "state": "new", |
| 22 | + "archived": false, |
| 23 | + "hash": "ecb10e6ecea01d3f770e4d08eb251179b0f9a98b", |
| 24 | + "submitter": { |
| 25 | + "id": 216065, |
| 26 | + "url": "https://patchwork.test/api/1.1/people/216065/", |
| 27 | + "name": "Tao Chen", |
| 28 | + |
| 29 | + }, |
| 30 | + "delegate": { |
| 31 | + "id": 121173, |
| 32 | + "url": "https://patchwork.test/api/1.1/users/121173/", |
| 33 | + "username": "bpf", |
| 34 | + "first_name": "BPF", |
| 35 | + "last_name": "", |
| 36 | + |
| 37 | + }, |
| 38 | + "mbox": "https://patchwork.test/project/netdevbpf/patch/[email protected]/mbox/", |
| 39 | + "series": [ |
| 40 | + { |
| 41 | + "id": 970926, |
| 42 | + "url": "https://patchwork.test/api/1.1/series/970926/", |
| 43 | + "web_url": "https://patchwork.test/project/netdevbpf/list/?series=970926", |
| 44 | + "date": "2025-06-11T15:48:58", |
| 45 | + "name": "[bpf-next] bpf: clear user buf when bpf_d_path failed", |
| 46 | + "version": 1, |
| 47 | + "mbox": "https://patchwork.test/series/970926/mbox/" |
| 48 | + } |
| 49 | + ], |
| 50 | + "comments": "https://patchwork.test/api/patches/14114605/comments/", |
| 51 | + "check": "success", |
| 52 | + "checks": "https://patchwork.test/api/patches/14114605/checks/", |
| 53 | + "tags": {}, |
| 54 | + "headers": { |
| 55 | + "Received": "from out-186.mta0.migadu.com (out-186.mta0.migadu.com\n [91.218.175.186])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 29219198E75\n\tfor <[email protected]>; Wed, 11 Jun 2025 15:49:31 +0000 (UTC)", |
| 56 | + "Authentication-Results": [ |
| 57 | + "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.218.175.186", |
| 58 | + "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev", |
| 59 | + "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.dev", |
| 60 | + "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.dev [email protected]\n header.b=\"BLMetV01\"" |
| 61 | + ], |
| 62 | + "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1749656974; cv=none;\n b=H3sJmO/4HOlIx6kUFl6H/+BRA9KPHHH4Q7GjlSA/LngQ6EFecK1QUciBapIR6C34s0H1sz1+glg3v1exuzPTkszlKJv44cGH+VioXoRre8Y0iWC1KVwdc7RHvgffJ0XPGihrNjrcuJjt4YmUCnouwVszIm4By1xzu3Sb6+nLec8=", |
| 63 | + "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1749656974; c=relaxed/simple;\n\tbh=Vsu5Xaf2CfmWYXrEWUU8kTg6xy3/CnahfubB8AomyEw=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=dncJRD9nOpjZrsdcvYkxd2CfccDyNQ8uHadiFb/G4K5K4GAr1MRjBv/suIeI85s0iKBmv5NZ3r2PFI1g9Yus7+jBZ5z/wo42zqDVLhXSK87Dx3X+clSbiW9VqQ7wzQM1/2xFRgNIlZ12hswHopIjCQCr+w52ofYIXiH5Ug7o85Q=", |
| 64 | + "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev;\n spf=pass smtp.mailfrom=linux.dev;\n dkim=pass (1024-bit key) header.d=linux.dev [email protected]\n header.b=BLMetV01; arc=none smtp.client-ip=91.218.175.186", |
| 65 | + "X-Report-Abuse": "Please report any abuse attempt to [email protected] and\n include these headers.", |
| 66 | + "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;\n\tt=1749656960;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding;\n\tbh=NkpbyMsiJRwWnx6iOR+RLlbhyzNlbJ3e38I3A+4NmfI=;\n\tb=BLMetV01lS4FXWjpoxALr+a7Mi0irlvKqYcAZBywjBIwgNGKzGMwf6SP0SwobrqhyTbR8H\n\tNQ/nTgeRdr9+LbZ4t/A+vxRUTO28kF4R6uvFYTrAwmTj5i/qgFhOAX9bHiICSohUcwmfK3\n\tWvRPHYKGvp0Puq6S/5gBm2Q5AFHG7m4=", |
| 67 | + "From": "Tao Chen <[email protected]>", |
| 68 | + "To": "[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected],\n\t[email protected]", |
| 69 | + |
| 70 | + "Subject": "[PATCH bpf-next] bpf: clear user buf when bpf_d_path failed", |
| 71 | + "Date": "Wed, 11 Jun 2025 23:48:58 +0800", |
| 72 | + "Message-ID": "<[email protected]>", |
| 73 | + "Precedence": "bulk", |
| 74 | + "X-Mailing-List": "[email protected]", |
| 75 | + "List-Id": "<bpf.vger.kernel.org>", |
| 76 | + "List-Subscribe": "<mailto:[email protected]>", |
| 77 | + "List-Unsubscribe": "<mailto:[email protected]>", |
| 78 | + "MIME-Version": "1.0", |
| 79 | + "Content-Transfer-Encoding": "8bit", |
| 80 | + "X-Migadu-Flow": "FLOW_OUT", |
| 81 | + "X-Patchwork-Delegate": "[email protected]" |
| 82 | + }, |
| 83 | + "content": "The bpf_d_path() function may fail. If it does,\nclear the user buf, like bpf_probe_read etc.\n\nSigned-off-by: Tao Chen <[email protected]>\n---\n kernel/trace/bpf_trace.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)", |
| 84 | + "diff": "diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c\nindex 0998cbbb963..bb1003cb271 100644\n--- a/kernel/trace/bpf_trace.c\n+++ b/kernel/trace/bpf_trace.c\n@@ -916,11 +916,14 @@ BPF_CALL_3(bpf_d_path, struct path *, path, char *, buf, u32, sz)\n \t * potentially broken verifier.\n \t */\n \tlen = copy_from_kernel_nofault(©, path, sizeof(*path));\n-\tif (len < 0)\n+\tif (len < 0) {\n+\t\tmemset(buf, 0, sz);\n \t\treturn len;\n+\t}\n \n \tp = d_path(©, buf, sz);\n \tif (IS_ERR(p)) {\n+\t\tmemset(buf, 0, sz);\n \t\tlen = PTR_ERR(p);\n \t} else {\n \t\tlen = buf + sz - p;\n", |
| 85 | + "prefixes": [ |
| 86 | + "bpf-next" |
| 87 | + ] |
| 88 | +} |
0 commit comments