summaryrefslogtreecommitdiff
path: root/lib/libpam
AgeCommit message (Collapse)Author
2023-06-20pam_krb5: Refuse to operate without a key to verify tickets.riastradh
New allow_kdc_spoof overrides this to restore previous behaviour which was vulnerable to KDC spoofing, because without a host or service key, pam_krb5 can't distinguish the legitimate KDC from a spoofed one. This way, having pam_krb5 enabled isn't dangerous even if you create an empty /etc/krb5.conf to use client SSO without any host services. Perhaps this should use krb5_verify_init_creds(3) instead, and thereby respect the rather obscurely named krb5.conf option verify_ap_req_nofail like the Linux pam_krb5 does, but: - verify_ap_req_nofail is default-off (i.e., vulnerable by default), - changing verify_ap_req_nofail to default-on would probably affect more things and therefore be riskier, - allow_kdc_spoof is a much clearer way to spell the idea, - this patch is a smaller semantic change and thus less risky, and - a security change with compatibility issues shouldn't have a workaround that might introduce potentially worse security issues or more compatibility issues. Perhaps this should use krb5_verify_user(3) with secure=1 instead, for simplicity, but it's not clear how to do that without first prompting for the password -- which we shouldn't do at all if we later decide we won't be able to use it anyway -- and without repeating a bunch of the logic here anyway to pick the service name. References about verify_ap_req_nofail: - mit-krb5 discussion about verify_ap_req_nofail: https://mailman.mit.edu/pipermail/krbdev/2011-January/009778.html - Oracle has the default-secure setting in their krb5 system: https://docs.oracle.com/cd/E26505_01/html/E27224/setup-148.html https://docs.oracle.com/cd/E26505_01/html/816-5174/krb5.conf-4.html#REFMAN4krb5.conf-4 https://docs.oracle.com/cd/E19253-01/816-4557/gihyu/ - Heimdal issue on verify_ap_req_nofail default: https://github.com/heimdal/heimdal/issues/1129
2023-06-20pam_ksu: No need for homedir access.riastradh
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2022-10-26nix double n, i or g in "ing", in comments and documentation.andvar
2022-06-15Set provider to NULL -- "pam" is not a valid security key helper library.hannken
Now ssh-agent no longer fails key addition with error: Cannot add provider: RSA is not an authenticator-hosted key
2022-04-10fix various typos in comments and output/log messages.andvar
2022-02-24Add constrain argumentschristos
2022-01-16libpam: remove stray semicolonrillig
No binary change.
2021-11-01Remove workaround, @rillig fixed the issue.christos
2021-11-01work around lint bugchristos
2021-10-30pam_exec: Convert realloc(x * y) to reallocarr.nia
Eliminate a now-redundant temporary variable.
2021-08-11cast from strchr fixed.christos
2021-08-11libpam: clean up LINTFLAGSrillig
Warning 346 is new, the other suppressions are not needed anymore.
2020-06-12lib/libpam: Fix the possible -Werror=stringop-truncationfox
Replace strncpy(3) with the safer strlcpy(3) and adjust the code. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@, christos@
2020-05-23Fix fallout from NO_STATIC_MODULES -> OPENPAM_STATIC_MODULES changes;rin
libpam.a fails to load any modules and does not work at all. At the moment, openpam_load.c at least must be compiled with and without OPENPAM_STATIC_MODULES for static and shared libraries, respectively. Therefore, use CSHLIBFLAGS again, in order to build objects for static and shared libraries separately. This may be ugly, but seems better for me than adding further hacks in libpam/libpam/Makefile, which is already complicated enough...
2020-05-01Fix the vax build and explain why...christos
2020-04-29Reverse sense of NO_STATIC_MODULES -> OPENPAM_STATIC_MODULES.riastradh
This avoids leaking NO_STATIC_MODULES into the public header, which has led to considerable confusion and workarounds in pkgrsc. PR security/39313 PR security/55216 ok christos
2020-03-03Add debugging commented out.christos
2020-03-01Redo the sshsk_sign() stuff properly, but putting the helper in libssh.sochristos
2020-03-01Add the sign client part.christos
2020-02-27This takes a provider nowchristos
2020-02-27one more level downchristos
2020-02-27probably fix previous: it wants mod.mk's PARSEDIR/.., not ../..,mrg
so it picks up the libpam/Makefile.inc.
2020-02-26Handle pam modules that are not in this subtree.christos
2020-02-07there is no potential overflow anymore (thanks Kamil)christos
2020-02-07stop using sprintf and check for buffer overflow.christos
2019-12-23Simply Subsection headersreed
There was a formatting issue with mandoc showing the literal "Ss" macros. I reported this bug to mandoc since groff didn't have same formatting. It was recommended to simplify the formatting due to the weird feature. Note because of this for groff I didn't use the Ux macro but spelled out UNIX literally for these subsection headers (since the macro reset the subsection formatting which was why the Ss macro was repeated before to reactivate it).
2019-10-13use GCC_NO_CAST_FUNCTION_TYPE.mrg
2019-10-13introduce some common variables for use in GCC warning disables:mrg
GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8) GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8) GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8) GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8) use these to turn off warnings for most GCC-8 complaints. many of these are false positives, most of the real bugs are already commited, or are yet to come. we plan to introduce versions of (some?) of these that use the "-Wno-error=" form, which still displays the warnings but does not make it an error, and all of the above will be re-considered as either being "fix me" (warning still displayed) or "warning is wrong."
2019-10-10Only exclude gcc-8 warnings if the gcc we're using is gcc>=8kre
2019-10-10Only exclude gcc-8 warnings when the gcc we're using is gcc>=8kre
2019-10-09don't warn for strncpy wtmp fields, they are not NUL terminated.christos
2019-10-09no error for function castchristos
2019-06-01Fix key loading logic and add log message when rejecting an unencrypted key.mlelstv
2018-08-26adjust to new libssh api.christos
2018-05-16Improve type safety by using the correct enum values.joerg
2018-04-07fix and use the macro.christos
2018-04-07function grew an extra argument now.christos
2018-02-04switch everyone to openssl.oldchristos
2017-07-03Remove workaround for ancient HTML generation code.wiz
2017-05-21Remove MKCRYPTO option.riastradh
Originally, MKCRYPTO was introduced because the United States classified cryptography as a munition and restricted its export. The export controls were substantially relaxed fifteen years ago, and are essentially irrelevant for software with published source code. In the intervening time, nobody bothered to remove the option after its motivation -- the US export restriction -- was eliminated. I'm not aware of any other operating system that has a similar option; I expect it is mainly out of apathy for churn that we still have it. Today, cryptography is an essential part of modern computing -- you can't use the internet responsibly without cryptography. The position of the TNF board of directors is that TNF makes no representation that MKCRYPTO=no satisfies any country's cryptography regulations. My personal position is that the availability of cryptography is a basic human right; that any local laws restricting it to a privileged few are fundamentally immoral; and that it is wrong for developers to spend effort crippling cryptography to work around such laws. As proposed on tech-crypto, tech-security, and tech-userlevel to no objections: https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of *bad* crypto that was conditional on it, e.g. DES in telnet... That should probably be removed too, but on the grounds that it is bad, not on the grounds that it is (nominally) crypto.
2017-05-06Bump versionchristos
2015-04-04Adapt to the new API.christos
2014-10-25When building with clang, make warnings about NULL checks of parametersjoerg
with attribute nonnull non-fatal.
2014-10-24pam library has moved and new fileschristos
2014-03-18Merge riastradh-drm2 to HEAD.riastradh
2014-02-27Remove tautological check.joerg
2014-01-07Annotate logit to provide transitive format string checks.joerg
2013-12-29Fix incorrect typeschristos
2013-12-28warns 6christos