Add a New Comment (Rich Markup)
Comment Type & Canned Response: None No canned response available
Indeed, thanks. Revised patch attached.
(file #28149)
@@ -5632,9 +5633,11 @@ check_repository_password (username, pas host_user_tmp = username;
/* Verify blank passwords directly, otherwise use crypt(). */ + crypt_passwd = crypt (password, found_password);
Do you think calling crypt(, NULL) is wise? Documentation does not describe behavior in this case. I would prefer guard this call with (found_password != NULL) condition.
if ((found_password == NULL) - || ((strcmp (found_password, crypt (password, found_password)) - == 0))) + || (crypt_passwd != NULL + && (strcmp (found_password, crypt (password, found_password)) + == 0)))
Here you can replace the crypt() call with already computed crypt_passwd value.
Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL (w/ NULL return) if the salt violates specifications. Additionally, on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords passed to crypt() fail with EPERM (w/ NULL return).
This change can potentially cause a NULL pointer dereference in cvs after calling crypt() for password verification.
Attached patch, against cvs 1.11.23, fixes.
--mancha
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 2 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9