Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp211988iob; Mon, 2 May 2022 17:21:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/mTR+PMN5jUs38WBXQRT9Ps5bf7dnootYQieFvyRWO+2P124+pUGa54DTb2y5YJwe4Gvp X-Received: by 2002:a17:902:c641:b0:15d:36e:cfa9 with SMTP id s1-20020a170902c64100b0015d036ecfa9mr14205041pls.67.1651537291796; Mon, 02 May 2022 17:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651537291; cv=none; d=google.com; s=arc-20160816; b=KhAZCMqAmrpBMO+IhCIG6P6kUEbEdTTSG+LXANeFRIvbq+Yok6DXQvjbpG/12pYiNv tbUTenIWlFHiXLcQPh9ROlFT7MqXBcBl0YJBKjH2iQDi0ocJToO/tVPGup44CGX7Qi7Y bY/VHmYH9TaWNzBCOujVxW9KfGTmjFYx6P+IcsKN04Mn26C3yf/acQ6cn7H6BpBdoc2U Qb5SjWEI0cSRxjOlPldHwiILysBb0PnljS2kwec7TEh3IY7kGgxFZyaomPQ4gaRkjEgY wTqXdvt7fC+PgS/qufqqgna3Um3ILKY6C81zb3mWF9wIQe33vjKV3VnuvLkzRt9MTQ4E DCGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=450+a8YD7aZQ0EGwCGQKaHlnNFXghGzV04RemoibDz0=; b=XPsxZRc1Hhl0vFfoqlGjCXZh/sr73sZL17uEkqOrEyqOfzO/B/b0yVh0agrrxc9E58 lu1AfP/MDdDE0jqDz5ealvDkny7jxE2EShc1lI1TGk3EPTqzIZ2V6YIREQwPZvX0M2Gm tVBhxbbEhkIB0+2Co03VGS3z2F3cuooF6a+J61BvFDIRzqSfr7CRoUQbwqTOP3MyxrZK QBgVtysOXvbkVpn9/n+20JGuFfoeCKrCGixD9p9XapDME8AVV/ipH/YXaV3GhtwPZ5x8 Qe+Jqt+54lcesr7iTYtRcUkVXwhzDtgCmjTzy26rURCT3a2JV7WTocg+bvN761/fpaPF 6fpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+y9BcKP; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g2-20020a056a000b8200b0050dfc410ab6si2283572pfj.142.2022.05.02.17.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:21:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+y9BcKP; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79F533AA76; Mon, 2 May 2022 17:18:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379830AbiEBL5o (ORCPT + 99 others); Mon, 2 May 2022 07:57:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233094AbiEBL5m (ORCPT ); Mon, 2 May 2022 07:57:42 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65BB1A044 for ; Mon, 2 May 2022 04:54:13 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id i38so25514041ybj.13 for ; Mon, 02 May 2022 04:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=450+a8YD7aZQ0EGwCGQKaHlnNFXghGzV04RemoibDz0=; b=V+y9BcKPTPPewHAowP0m9B4NF9B2bPaEnby0teZKw0gCUMoO/0/BCRPcnFs1FRNZx+ ZrOFb8tsHaTMwN4FDqA/ZRJasiUiJcxNlpRJLQAEubEcmFMIHrA4+iuuWDxEECasppS7 CJ5EQ+4nK2fvi8Yk8q4L/IXNbyPVL478KJ74W3MU5pGhbOmmCYD9vVcUieHdTvOD4EGy oad/Fzx9zwJ4WqLJhMQ9mqhs4lMrh2XdyOwimlkhqD9Ks7OxkRTsWIgbxny9q1tNtdDP pyC/NCSZLbfKrCV/HmElBs9I79Ehuo3/+juuijxCkdow80Ex7E5AaUs2UwXO1gs8k3Va 5XwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=450+a8YD7aZQ0EGwCGQKaHlnNFXghGzV04RemoibDz0=; b=ksSE8B1bQxr0pHaBYG1D43c7CevePNgKimIVKmMUhON4pgQ+Bg5gC3Ae+pf8h8f4h3 1TAKPRLfu3PgnfTzaOQUJhCV3EisKi4hQb5Ak5I5UGZx2uBDDZfwNGwC8SkCCY+ixqpM yFRp/fuswG0rfQLq6JY3A2TrEQeT3+ubDL1c3/khvwcyGTfeJ3sGI087gZVHaszGWWmv U8736Lm4lXEPQvbNsuQiUDyotOXBqimI3f8Q8LbgqbFLDaF++6JcMKJFfzJ5qMyoQqCU Am8RwRyNpOa34ewcx9/sYuXni/HmHu1snDh3NZ7ZTkMAaHqSSXbMXLnFwwGJLGRPsrVe FE3g== X-Gm-Message-State: AOAM5318bZUNuJfIDjJfelxjq1cTYAtPVTvHem1YHGu4Pz8dFJvJhIFW 1TOh5Y3Ml48BLGvyWBqRHVwFssiK8x1peuRsKZ2IZLGXOes9wA== X-Received: by 2002:a25:6652:0:b0:645:d4c1:eb7 with SMTP id z18-20020a256652000000b00645d4c10eb7mr9786088ybm.412.1651492452482; Mon, 02 May 2022 04:54:12 -0700 (PDT) MIME-Version: 1.0 From: Naresh Kamboju Date: Mon, 2 May 2022 17:24:01 +0530 Message-ID: Subject: [arm] lib: bitmap.sh: BUG: KFENCE: out-of-bounds read in _find_next_bit_le+0x10/0x48 To: open list , "open list:KERNEL SELFTEST FRAMEWORK" , Linux ARM Cc: Shuah Khan , Anders Roxell , Marco Elver , Kees Cook , decot@googlers.com, "Tobin C. Harding" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following kernel BUG KFENCE noticed on qemu_arm while testing lib: bitmap.sh with kselftest merge config build image [1] & [2]. metadata: git_ref: master git_repo: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline git_sha: 672c0c5173427e6b3e2a9bbb7be51ceeec78093a git_describe: v5.18-rc5 kernel_version: 5.18.0-rc5 kernel-config: https://builds.tuxbuild.com/28a2wdk3XzmLVGqD5njLS4uX1tm/config artifact-location: https://builds.tuxbuild.com/28a2wdk3XzmLVGqD5njLS4uX1tm toolchain: gcc-10 Test log: --------- # selftests: lib: bitmap.sh [ 36.266913] test_bitmap: loaded. [ 36.269151] test_bitmap: parselist: 14: input is '0-2047:128/256' OK, Time: 4600 [ 36.273024] ================================================================== [ 36.275942] BUG: KFENCE: out-of-bounds read in _find_next_bit_le+0x10/0x48 [ 36.275942] [ 36.279808] Out-of-bounds read at 0x9ec8e937 (4096B right of kfence-#29): [ 36.283046] _find_next_bit_le+0x10/0x48 [ 36.285030] [ 36.285816] kfence-#29: 0xf28dd28d-0x0b305c8e, size=4096, cache=kmalloc-4k [ 36.285816] [ 36.289807] allocated by task 498 on cpu 1 at 36.272960s: [ 36.292432] test_bitmap_printlist+0x2c/0x13c [test_bitmap] [ 36.295174] test_bitmap_init+0x5c/0xefc [test_bitmap] [ 36.297709] do_one_initcall+0x70/0x330 [ 36.299605] do_init_module+0x4c/0x26c [ 36.301484] sys_finit_module+0xdc/0x138 [ 36.303452] ret_fast_syscall+0x0/0x1c [ 36.305294] 0xbebec788 [ 36.306516] [ 36.307264] CPU: 1 PID: 498 Comm: modprobe Not tainted 5.18.0-rc5 #1 [ 36.310304] Hardware name: Generic DT based system [ 36.312658] ================================================================== [ 36.316609] test_bitmap: bitmap_print_to_pagebuf: input is '0-32767 [ 36.316609] ', Time: 43635540 [ 36.333605] test_bitmap: all 1945 tests passed [ 36.360116] test_bitmap: unloaded. # bitmap: ok Reported-by: Linux Kernel Functional Testing -- Linaro LKFT https://lkft.linaro.org [1] https://lkft.validation.linaro.org/scheduler/job/4975877#L995 [2] https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v5.18-rc5/testrun/9320073/suite/linux-log-parser/test/check-kernel-bug-4975877/log