pbkdf2 needs configurable hashing rounds for FIPS 140-3

Bug #2125685 reported by Filippo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openldap (Ubuntu)
In Progress
Wishlist
Jonas Jelten
Jammy
In Progress
Wishlist
Jonas Jelten
Noble
In Progress
Wishlist
Jonas Jelten
Plucky
In Progress
Wishlist
Jonas Jelten
Questing
In Progress
Wishlist
Jonas Jelten

Bug Description

[ Impact ]

Add configurable rounds for pw-pbkdf2.so module

Without the ability to configure the iteration count, it is not possible to meet current security best practices or achieve compliance with FIPS 140-3, which requires configurable and sufficiently high iteration counts for PBKDF2.

[ Test Plan ]

 * install slapd and slapd-contrib
 * before update: only supports hardcoded 10000 rounds:
   slappasswd -o module-load=pw-pbkdf2.so -h {PBKDF2-SHA512}
   -> observe {PBKDF2-SHA512}10000$...
 * after update, any round number can be configured:
   slappasswd -o module-load="pw-pbkdf2.so 1337" -h {PBKDF2-SHA512}
   -> observe {PBKDF2-SHA512}1337$...

[ Where problems could occur ]

 * pbkdf2 password validation/hashing could get a regression
 * Due to the configurable number amount, old passwords could become invalid due do different round counts

[ Original Report ]

On Ubuntu 24.04, the OpenLDAP package ships with the library /usr/lib/ldap/pw-pbkdf2.so.
While this module works for generating PBKDF2-SHA512 password hashes, it does not provide an option to configure the number of iterations.

For example:
slappasswd -o module-load=pw-pbkdf2.so -h {PBKDF2-SHA512}

generates a hash with a fixed iteration count (e.g. 10000) and does not accept parameters to increase it.

In contrast, the upstream contrib module passwd/pbkdf2 on https://git.openldap.org/openldap/openldap/-/tree/master/contrib/slapd-modules/passwd/pbkdf2

supports the iteration count option and allows administrators to configure it.

moduleload pw-pbkdf2.so [iterations]

Steps to reproduce:

Install OpenLDAP on Ubuntu 24.04. (slapd and slapd-contrib pakages)
Run
slappasswd -o module-load=pw-pbkdf2.la -h {PBKDF2} -s secret
{PBKDF2}10000$ZvU8GRSybbefW48n8BeyuA$XE1t4W09ZP0z8zmLVb/SbwaOl2Y

Tags: server-todo

Related branches

Revision history for this message
Lena Voytek (lvoytek) wrote :

Thank you for the bug report, I can confirm no releases of Ubuntu have the iterations option available since the feature was added recently for future OpenLDAP releases here - https://git.openldap.org/openldap/openldap/-/commit/f602563bf4a9512885c8e3488d03b3f812cf42d9. Updating the affected releases.

Changed in openldap (Ubuntu Jammy):
status: New → Confirmed
Changed in openldap (Ubuntu Noble):
status: New → Confirmed
Changed in openldap (Ubuntu Plucky):
status: New → Confirmed
Changed in openldap (Ubuntu Questing):
status: New → Confirmed
tags: added: server-triage-discuss
Revision history for this message
Christian Ehrhardt (paelzer) wrote :

Right Lena, this would be picked up natrually on the merge for 26.04 when upstream has a new release by then.

@Fillipo are you or anyone working (or demanding) on this to go to older releases for FIPS support?

I subscribed Henry for the FIPS aspect of it.

Revision history for this message
Filippo (filippom) wrote :

Hi Lena and Christian,

Thank you for your input and for pointing out that this functionality will "naturally" be available in 26.04 once upstream provides it.

I would kindly like to ask for your support regarding one point: since using PBKDF2 with a configurable number of iterations is quite important for meeting security requirements (including in some cases FIPS 140-3), do you think it would be possible to introduce this option also in Ubuntu 24.04 (perhaps via a maintenance update)?

Best regards,

Filippo

Revision history for this message
Lena Voytek (lvoytek) wrote :

Thank you for the response Filippo, I can work on adding this feature the stable releases :)

Changed in openldap (Ubuntu Questing):
status: Confirmed → In Progress
assignee: nobody → Lena Voytek (lvoytek)
Changed in openldap (Ubuntu Jammy):
assignee: nobody → Lena Voytek (lvoytek)
Changed in openldap (Ubuntu Noble):
assignee: nobody → Lena Voytek (lvoytek)
Changed in openldap (Ubuntu Plucky):
assignee: nobody → Lena Voytek (lvoytek)
tags: added: server-todo
removed: server-triage-discuss
Jonas Jelten (jj)
Changed in openldap (Ubuntu Questing):
assignee: Lena Voytek (lvoytek) → Jonas Jelten (jj)
Changed in openldap (Ubuntu Plucky):
assignee: Lena Voytek (lvoytek) → Jonas Jelten (jj)
Changed in openldap (Ubuntu Noble):
assignee: Lena Voytek (lvoytek) → Jonas Jelten (jj)
Changed in openldap (Ubuntu Jammy):
assignee: Lena Voytek (lvoytek) → Jonas Jelten (jj)
Jonas Jelten (jj)
Changed in openldap (Ubuntu Plucky):
status: Confirmed → In Progress
Changed in openldap (Ubuntu Noble):
status: Confirmed → In Progress
Changed in openldap (Ubuntu Jammy):
status: Confirmed → In Progress
status: In Progress → Won't Fix
Revision history for this message
Jonas Jelten (jj) wrote (last edit ):

Hi Filippo! I've added the stable update template above, please check if the test instructions seem reasonable :)
Then we can proceed to backport up to 22.04.

description: updated
Changed in openldap (Ubuntu Jammy):
status: Won't Fix → In Progress
Jonas Jelten (jj)
Changed in openldap (Ubuntu Jammy):
importance: Undecided → Wishlist
Changed in openldap (Ubuntu Noble):
importance: Undecided → Wishlist
Changed in openldap (Ubuntu Plucky):
importance: Undecided → Wishlist
Changed in openldap (Ubuntu Questing):
importance: Undecided → Wishlist
description: updated
Revision history for this message
Jonas Jelten (jj) wrote :

The upstream patch actually has a bug, the argument is off by one. Reported & sent patch: https://bugs.openldap.org/show_bug.cgi?id=10399

description: updated
Revision history for this message
Filippo (filippom) wrote :

Hi Jonas,

That looks great — the test instructions are clear and reasonable.
Thank you very much for your work on this!

Jonas Jelten (jj)
summary: - pbkdf2 module not make iterations configurable and FIPS 140-3
+ pbkdf2 needs configurable hashing rounds for FIPS 140-3
Revision history for this message
Henry Coggill (henrycoggill) wrote :

Jammy was the first Ubuntu LTS with FIPS 140-3 support, so if it's possible to backport to 22.04 then we should be covered for FIPS use-cases, thanks.

Revision history for this message
Jonas Jelten (jj) wrote (last edit ):

Yes, I've included the patch on 22.04! (at first i was confused and thought jammy didn't have the module :)

Jonas Jelten (jj)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.