Patch Detail
Show a patch.
GET /api/patches/11856/?format=api
{ "id": 11856, "url": "https://patchwork.libcamera.org/api/patches/11856/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11856/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210407043620.1756347-2-hiroh@chromium.org>", "date": "2021-04-07T04:36:20", "name": "[libcamera-devel,v2,2/2] android: CameraDevice: Validate buffer_handle by CameraBuffer::isValidBuffer()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "60951911c2e947f7ea93a9d1b6611f0a06b01de7", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11856/mbox/", "series": [ { "id": 1898, "url": "https://patchwork.libcamera.org/api/series/1898/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1898", "date": "2021-04-07T04:36:19", "name": "[libcamera-devel,v2,1/2] android: CameraBuffer: Add a static function to check a buffer validness", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1898/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11856/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11856/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 75184BD695\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 7 Apr 2021 04:36:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 35FC0687DB;\n\tWed, 7 Apr 2021 06:36:31 +0200 (CEST)", "from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com\n\t[IPv6:2607:f8b0:4864:20::1034])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7174E6879F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 7 Apr 2021 06:36:29 +0200 (CEST)", "by mail-pj1-x1034.google.com with SMTP id\n\tz22-20020a17090a0156b029014d4056663fso650530pje.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Apr 2021 21:36:29 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:4180:40db:6f79:a143])\n\tby smtp.gmail.com with ESMTPSA id\n\td2sm19466967pgp.47.2021.04.06.21.36.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Apr 2021 21:36:27 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"m952RnXo\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=n5Yvb32OqZp+I0yt8WUj7KhqsNdr2yErjMwK5nk0/0g=;\n\tb=m952RnXobrALknJWLZwwAJ4zFXd9WXAfGr3AMdVWnD0HcTB6JEr2N5mlivow7KqRGt\n\tdQ8HZT3HqPZ61SKdN/fCNAlSlf7eJmI/xNDeOxRqhAMOea8S2Quu90HqXC6GdsbuHOWJ\n\tGxxgNH47qMM0qwghGHKZXnlt7YHIsURaLP/4Q=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=n5Yvb32OqZp+I0yt8WUj7KhqsNdr2yErjMwK5nk0/0g=;\n\tb=Hl6ybK4jPcYJk4E+QBeIQXe3RkrW0YrHCxSpv5H1pJUbF1j5hxhEG+vGFQ/LK4ONsR\n\t5RSqwqhEQPWFiP5R408LcZPmjS1TMFLZm49sZUcVcS1Gai/o1InKfPav5iC+e9gy1Psi\n\trTSSM9PFCGNRmKxVxk7yheKeZFfXbSALetXAhmU6AwIrwwgUwEyvZARnXUq8JNuVu1eZ\n\tOgr4jOpCA7UOmuBlbrjoMmHmk4noYcqH9/AtTzWA1azD60krqDgcbXfxBmeNr0EJm0Hs\n\tm6oLY6dtLnLLtMKaQ1q658jfNTAu7wlI/L2YtOKVOf1XkXjLrf9GSX+uVmDberZB8lh8\n\tGLIQ==", "X-Gm-Message-State": "AOAM5332AUVRvqzRfVtxe9BZKlDOrfxHuZr2gZaJrxg+Vtv1/Nhy7jt6\n\tojhTBesxeK4R+WfXFITLJ8OJpo/eU1yplA==", "X-Google-Smtp-Source": "ABdhPJxIlvVFjqzFuAXSAWSI90VFywswpJVg7qWPhSMa6Qh3CTVU26IAyZqIprfjjIvG2mT3127Sog==", "X-Received": "by 2002:a17:90a:6343:: with SMTP id\n\tv3mr1438562pjs.153.1617770187644; \n\tTue, 06 Apr 2021 21:36:27 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 7 Apr 2021 13:36:20 +0900", "Message-Id": "<20210407043620.1756347-2-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.31.0.208.g409f899ff0-goog", "In-Reply-To": "<20210407043620.1756347-1-hiroh@chromium.org>", "References": "<20210407043620.1756347-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 2/2] android: CameraDevice: Validate\n\tbuffer_handle by CameraBuffer::isValidBuffer()", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "This adds a validation to buffer_handle provided in\nCameraDevice::processCaptureRequest() by using\nCameraBuffer::isValidBuffer().\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 89044efa..8a742812 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -293,6 +293,11 @@ bool isValidRequest(camera3_capture_request_t *camera3Request)\n \t\t\t\t<< \") in buffer \" << i;\n \t\t\treturn false;\n \t\t}\n+\n+\t\tif (!CameraBuffer::isValidBuffer(handle)) {\n+\t\t\tLOG(HAL, Error) << \"buffer \" << i << \"is invalid\";\n+\t\t\treturn false;\n+\t\t}\n \t}\n \n \treturn true;\n", "prefixes": [ "libcamera-devel", "v2", "2/2" ] }