lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a9b57156-4b2-8e62-d083-c85ad9b085db@inria.fr>
Date: Sat, 20 Dec 2025 15:25:46 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Nikunj A Dadhania <nikunj@....com>, "Borislav Petkov (AMD)" <bp@...en8.de>, 
    Tom Lendacky <thomas.lendacky@....com>, linux-kernel@...r.kernel.org, 
    oe-kbuild-all@...ts.linux.dev
Subject: arch/x86/coco/sev/core.c:2838:12-13: WARNING opportunity for
 kfree_sensitive/kvfree_sensitive (memset at line 2837) (fwd)



---------- Forwarded message ----------
Date: Sat, 20 Dec 2025 22:23:02 +0800
From: kernel test robot <lkp@...el.com>
To: oe-kbuild@...ts.linux.dev
Cc: lkp@...el.com, Julia Lawall <julia.lawall@...ia.fr>
Subject: arch/x86/coco/sev/core.c:2838:12-13: WARNING opportunity for
    kfree_sensitive/kvfree_sensitive (memset at line 2837)

BCC: lkp@...el.com
CC: oe-kbuild-all@...ts.linux.dev
CC: linux-kernel@...r.kernel.org
TO: Nikunj A Dadhania <nikunj@....com>
CC: "Borislav Petkov (AMD)" <bp@...en8.de>
CC: Tom Lendacky <thomas.lendacky@....com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dd9b004b7ff3289fb7bae35130c0a5c0537266af
commit: c5529418d05079384af4dbbb6f6156344c2ffce2 x86/sev: Carve out and export SNP guest messaging init routines
date:   12 months ago
:::::: branch date: 2 days ago
:::::: commit date: 12 months ago
config: x86_64-randconfig-104-20251217 (https://download.01.org/0day-ci/archive/20251220/202512202235.WHPQkLZu-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Julia Lawall <julia.lawall@...ia.fr>
| Closes: https://lore.kernel.org/r/202512202235.WHPQkLZu-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/x86/coco/sev/core.c:2838:12-13: WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line 2837)

vim +2838 arch/x86/coco/sev/core.c

c5529418d05079 Nikunj A Dadhania 2025-01-06  2825
c5529418d05079 Nikunj A Dadhania 2025-01-06  2826  void snp_msg_free(struct snp_msg_desc *mdesc)
c5529418d05079 Nikunj A Dadhania 2025-01-06  2827  {
c5529418d05079 Nikunj A Dadhania 2025-01-06  2828  	if (!mdesc)
c5529418d05079 Nikunj A Dadhania 2025-01-06  2829  		return;
c5529418d05079 Nikunj A Dadhania 2025-01-06  2830
c5529418d05079 Nikunj A Dadhania 2025-01-06  2831  	kfree(mdesc->ctx);
c5529418d05079 Nikunj A Dadhania 2025-01-06  2832  	free_shared_pages(mdesc->response, sizeof(struct snp_guest_msg));
c5529418d05079 Nikunj A Dadhania 2025-01-06  2833  	free_shared_pages(mdesc->request, sizeof(struct snp_guest_msg));
c5529418d05079 Nikunj A Dadhania 2025-01-06  2834  	free_shared_pages(mdesc->certs_data, SEV_FW_BLOB_MAX_SIZE);
c5529418d05079 Nikunj A Dadhania 2025-01-06  2835  	iounmap((__force void __iomem *)mdesc->secrets);
c5529418d05079 Nikunj A Dadhania 2025-01-06  2836
c5529418d05079 Nikunj A Dadhania 2025-01-06 @2837  	memset(mdesc, 0, sizeof(*mdesc));
c5529418d05079 Nikunj A Dadhania 2025-01-06 @2838  	kfree(mdesc);

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ