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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-c4326563d9abe86ad54474f9e9142bd2663eede5@git.kernel.org>
Date:   Sun, 22 Jul 2018 08:23:46 -0700
From:   tip-bot for Andy Shevchenko <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     ard.biesheuvel@...aro.org, mingo@...nel.org,
        linux-kernel@...r.kernel.org, lukas@...ner.de, tglx@...utronix.de,
        hdegoede@...hat.com, torvalds@...ux-foundation.org, hpa@...or.com,
        peterz@...radead.org, andriy.shevchenko@...ux.intel.com
Subject: [tip:efi/core] efivars: Call guid_parse() against guid_t type of
 variable

Commit-ID:  c4326563d9abe86ad54474f9e9142bd2663eede5
Gitweb:     https://git.kernel.org/tip/c4326563d9abe86ad54474f9e9142bd2663eede5
Author:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
AuthorDate: Fri, 20 Jul 2018 10:47:26 +0900
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 22 Jul 2018 14:13:44 +0200

efivars: Call guid_parse() against guid_t type of variable

uuid_le_to_bin() is deprecated API and take into consideration that variable,
to where we store parsed data, is type of guid_t we switch to guid_parse()
for sake of consistency.

While here, add error checking to it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Hans de Goede <hdegoede@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Lukas Wunner <lukas@...ner.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Link: http://lkml.kernel.org/r/20180720014726.24031-10-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 fs/efivarfs/inode.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c
index 71fccccf317e..8c6ab6c95727 100644
--- a/fs/efivarfs/inode.c
+++ b/fs/efivarfs/inode.c
@@ -86,7 +86,9 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry,
 	/* length of the variable name itself: remove GUID and separator */
 	namelen = dentry->d_name.len - EFI_VARIABLE_GUID_LEN - 1;
 
-	uuid_le_to_bin(dentry->d_name.name + namelen + 1, &var->var.VendorGuid);
+	err = guid_parse(dentry->d_name.name + namelen + 1, &var->var.VendorGuid);
+	if (err)
+		goto out;
 
 	if (efivar_variable_is_removable(var->var.VendorGuid,
 					 dentry->d_name.name, namelen))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ