Debian 13 ISM Word-Count Enforcement Component Definition
debian-13-pam-wordcount · version 1.0.0 · OSCAL 1.1.2
technically-tested published
| Document | component-definition.jsonsha256 b8d7ff95838a7d1d6000c50789dddd96a6b93ee750a4d0e98bcf845d6d748f96 |
|---|---|
| Identity | https://library.oscalops.net/component-definitions/327f09ef-96c6-54e6-aad8-9d305442ebfe/a9fbb439-f90a-4d68-9cd0-ff716bbcdef7/1.0.0/component-definition.json |
| Source | https://github.com/dmblack/oscal_component-definition_debian-passphrase-hardening.git at 85d9681d323d20210966c1a330836b4c2637ea18 |
| Versions | All versions of debian-13-pam-wordcount |
From the author
Theoretical component. It describes a configuration that satisfies the named controls when applied; it is not an assertion that any particular system is running it. An SSP leveraging this component must supply the implementation evidence for its own hosts.
Assurance state is 'technically-tested': the configuration was applied to a clean Debian 13 install and verified end to end.
Declared by this document
What the contributor says this component applies to and touches. These are the contributor's own statements in their own vocabulary, not the library's, and the library does not check them beyond what OSCAL requires of a property.
| Property | Value | Vocabulary |
|---|---|---|
| os-codename | trixie | https://ns.oscalops.net/component-definitions |
| os-distribution | debian | https://ns.oscalops.net/component-definitions |
| os-release | 13 | https://ns.oscalops.net/component-definitions |
| publisher | library_component-definition contributors | https://ns.oscalops.net/component-definitions |
| setting | file:/etc/security/ism-wordcount.conf | https://ns.oscalops.net/component-definitions |
| setting | file:/usr/local/sbin/ism-wordcount-check | https://ns.oscalops.net/component-definitions |
| setting | pam-auth-update:ism-wordcount | https://ns.oscalops.net/component-definitions |
| setting | pam-auth-update:ism-wordcount-module | https://ns.oscalops.net/component-definitions |
| setting | pam-module:pam_ism_wordcount.so | https://ns.oscalops.net/component-definitions |
| additional-packages-required | none at runtime; building the module needs libpam0g-dev and a C compiler on a build host | https://ns.oscalops.net/component-definitions/debian-13-pam-wordcount |
| dependency-posture | No packages beyond libpam-pwquality, libpwquality-tools and cracklib-runtime; pam_exec ships in libpam-modules. libpam-python and libpam-script were evaluated and rejected. | https://ns.oscalops.net/component-definitions/debian-13-pam-wordcount |
| enforcement-mechanism | pam_ism_wordcount.so (in-process, default) or pam_exec.so running ism-wordcount-check (fallback) | https://ns.oscalops.net/component-definitions/debian-13-pam-wordcount |
| pam-stack-priority | 1020 (after pam_pwquality at 1024, ahead of pam_unix at 256) | https://ns.oscalops.net/component-definitions/debian-13-pam-wordcount |
Debian 13 ISM word-count enforcement (pam_ism_wordcount)
Enforces the ism-1558 minimum word count for passwords that are a sequence of words: at least 4 words on non-classified, OFFICIAL: Sensitive and PROTECTED systems, 5 on SECRET and 6 on TOP SECRET. Single-token passwords are passed through untouched, which is what lets ism-1558 and ism-2080 hold together.
The default implementation is pam_ism_wordcount.so, a purpose-built PAM module that counts whitespace-delimited words in one read-only, in-process pass. A pam_exec(8) shell equivalent is shipped as a fallback for hosts that cannot deploy a compiled module.
Depends on debian-13-pwquality-base. The check reads the new password but never asks for it; pam_pwquality, earlier in the stack, obtains it. Without it pam-auth-update still gives pam_unix use_authtok, there is no token to use, and every password change fails: verified on a clean Debian 13 install. The apply script refuses to run without pam_pwquality in the stack.
Purpose. Enforce the ISM word-count requirement for passphrases on local Debian accounts without imposing a complexity requirement on single-token passwords.
Properties
| os-distribution | debian |
|---|---|
| os-release | 13 |
| os-codename | trixie |
| setting | pam-auth-update:ism-wordcount-module |
| setting | pam-auth-update:ism-wordcount |
| setting | pam-module:pam_ism_wordcount.so |
| setting | file:/usr/local/sbin/ism-wordcount-check |
| setting | file:/etc/security/ism-wordcount.conf |
| enforcement-mechanism | pam_ism_wordcount.so (in-process, default) or pam_exec.so running ism-wordcount-check (fallback) |
| dependency-posture | No packages beyond libpam-pwquality, libpwquality-tools and cracklib-runtime; pam_exec ships in libpam-modules. libpam-python and libpam-script were evaluated and rejected. |
| pam-stack-priority | 1020 (after pam_pwquality at 1024, ahead of pam_unix at 256) |
| additional-packages-required | none at runtime; building the module needs libpam0g-dev and a C compiler on a build host |
Australian Cyber Security Centre: Information Security Manual v2026.09.4
The ISM word-count requirement, as published in the ACSC ISM OSCAL catalogue release v2026.09.4.
| Control | Status | Applicability | Summary |
|---|---|---|---|
| ISM-1558 | partial | NC, OS, P, S, TS | Partially implemented. This component enforces the word-count limb. Sequences, repeats and account-derived strings are rejected by debian-13-pam-pwquality; the… |
ISM-1558 — Password strength
Partially implemented. This component enforces the word-count limb. Sequences, repeats and account-derived strings are rejected by debian-13-pam-pwquality; the provenance limbs are not enforced by any component.
ENFORCED, verified by behaviour through the PAM stack on all three applicability tiers: a password using a sequence of words must use at least 4 words on non-classified, OFFICIAL: Sensitive and PROTECTED systems, 5 on SECRET and 6 on TOP SECRET. This is implemented by pam_ism_wordcount.so, a purpose-built PAM module that counts whitespace-delimited words in a single read-only pass. It runs in-process, so the candidate never leaves the PAM process. A pam_exec(8) shell equivalent is shipped as a fallback for hosts that cannot deploy a compiled module; pam_exec ships in libpam-modules, so neither route requires an additional package.
Crucially, the check applies ONLY to passwords that are a sequence of words. A single-token password is not one, so it is passed through untouched. That is what allows this control and ism-2080 to hold simultaneously; see the remarks for why a character-class module cannot.
NOT ENFORCED: a sequence of categorised words, a real sentence in natural language, and song lyrics, quotes or other publicly available material all satisfy a word count while being exactly what this control prohibits. Verified: all three are still accepted. Determining whether words were randomly selected is not something any available module can do.
Residual risk Word count is enforced; randomness and provenance of the words are not. Natural-language sentences, lyrics and categorised word lists remain accepted.
Remarks
Why not pam_passwdqc: it can enforce a word count, but passwdqc requires each min value to be no larger than the preceding one, so 'disabled' can only ever apply to the weakest character-class tiers. It can therefore never express 'reject all non-passphrases regardless of class'. Tested: under min=disabled,disabled,15,15,15 with passphrase=4 a two-word candidate is correctly rejected, but a 15-character single-token password is ALSO rejected -- which breaches ism-2080, since ism-1558 governs only passwords using a sequence of words. passwdqc's min is additionally an effective length rather than a raw character count, so it cannot assert the literal 'minimum of 15 characters' that ism-0421 states.
The pam_exec approach keys off word structure instead, which is what the control actually describes, and leaves single-token passwords alone.
Implementation choice: a purpose-built C module is the default because it removes the only real exposure of the shell route, where expose_authtok passes the cleartext candidate across a pipe to a child process. The module reads PAM_AUTHTOK in-process and the candidate is never copied, logged, or passed to another process.
C rather than Rust: the check is a single read-only pass counting whitespace transitions, with no allocation, no copying and no index arithmetic, so the memory-safety hazards C is criticised for are absent rather than merely managed. A Rust module would still require #[no_mangle] extern "C" and an unsafe read of a raw *const c_char from pam_get_item, placing unsafe code at exactly the point of risk, while adding a rustc build dependency and a much larger artefact. The source is 91 lines and compiles clean under -Wall -Wextra -Werror; the resulting object is roughly 15 kB and links only libpam and libc.
Alternatives evaluated and rejected: libpam-python would also run in-process but depends on libpython3.13 and installs 11 packages including the full CPython standard library, linking a Python interpreter into sshd, login, sudo and cron; its Debian changelog records 'Fix CVE-2019-16729 again' in 2024, five years after the original. libpam-script uses the same external script model as pam_exec and so changes nothing.
The pam_exec fallback, where used, is hardened: pinned to type=password, ulimit -c 0 so a credential cannot reach a core file, umask 077, the shell read builtin rather than a command substitution so no second process holds the cleartext, and no branch that logs or passes the candidate as a command argument.
Residual mitigation: pwqgen(1) or pwmake(1) generate passphrases so users never select words themselves, which is the only practical answer to the provenance limbs.
Configuration and scripts
- scripts/ism-wordcount-check ism-1558 word-count check
sha256 c9f4008474a815df91fddcfe707d809c0fff207d831ed27362205abdf526d646 - config/pam-configs/ism-wordcount pam-auth-update profile for the word-count check
sha256 f9d3ae6b5ed756e558b3eb7a542a620f04fee77a3e5020e6906e921c3fedb247 - src/pam_ism_wordcount.c pam_ism_wordcount source
sha256 9b90684ccdbd5fdedb3f2940d65b26e7631e7706e4384696057d11edb0ed5b92 - config/pam-configs/ism-wordcount-module pam-auth-update profile for the in-process module
sha256 75c74b0466a39f6a66694c2dca9e11225bb02b0829919017094b05e7d6645e40 - scripts/verify-wordcount.sh Verification script
sha256 6eab210aa9c8edf77481d35e108cd7b165e0a8e7b0ae2b44d630840f34b1d84f
Files
| Resource | File | SHA-256 |
|---|---|---|
| ism-1558 word-count check | scripts/ism-wordcount-check | c9f4008474a815df91fddcfe707d809c0fff207d831ed27362205abdf526d646 |
| pam-auth-update profile for the word-count check | config/pam-configs/ism-wordcount | f9d3ae6b5ed756e558b3eb7a542a620f04fee77a3e5020e6906e921c3fedb247 |
| pam_ism_wordcount source | src/pam_ism_wordcount.c | 9b90684ccdbd5fdedb3f2940d65b26e7631e7706e4384696057d11edb0ed5b92 |
| Build file for the word-count module | src/Makefile | 223b10fddc67b9a242cdd6f18f3f84e55bd28b1589c72d86da0d261cea9aacc2 |
| pam-auth-update profile for the in-process module | config/pam-configs/ism-wordcount-module | 75c74b0466a39f6a66694c2dca9e11225bb02b0829919017094b05e7d6645e40 |
| Apply script | scripts/apply-wordcount.sh | f5dc40e4a8016a887776246a4437a1d7d920065013a3e1bbd1aa7726a8d0fef8 |
| Verification script | scripts/verify-wordcount.sh | 6eab210aa9c8edf77481d35e108cd7b165e0a8e7b0ae2b44d630840f34b1d84f |
External references
- ACSC ISM OSCAL catalogue v2026.09.4: https://raw.githubusercontent.com/AustralianCyberSecurityCentre/ism-oscal/v2026.09.4/ISM_catalog.json
- debian-13-pwquality-base component-definition: https://library.oscalops.net/component-definitions/debian-13-pwquality-base/1.0.0/component-definition.json