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-next>] [day] [month] [year] [list]
Message-Id: <20210923001442.58278-1-skhan@linuxfoundation.org>
Date:   Wed, 22 Sep 2021 18:14:42 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     mcgrof@...nel.org, jeyu@...nel.org
Cc:     Shuah Khan <skhan@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] module: fix invalid ELF structure error to print error code

When elf_validity_check() returns error, load_module() prints an
error message without error code. It is hard to determine why the
module ELF structure is invalid without this information. Fix the
error message to print the error code.

Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
---
 kernel/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/module.c b/kernel/module.c
index 40ec9a030eec..a0d412d396d6 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3941,7 +3941,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
 	 */
 	err = elf_validity_check(info);
 	if (err) {
-		pr_err("Module has invalid ELF structures\n");
+		pr_err("Module has invalid ELF structures:errno(%ld)\n", err);
 		goto free_copy;
 	}
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ