Page MenuHomeFreeBSD

Fix lib/libc/nss/getgr_test with large numbers of groups
ClosedPublic

Authored by asomers on Dec 31 2024, 9:01 PM.
Tags
None
Referenced Files
F132133772: D48275.diff
Tue, Oct 14, 1:33 AM
Unknown Object (File)
Wed, Oct 8, 2:51 PM
Unknown Object (File)
Thu, Oct 2, 11:06 AM
Unknown Object (File)
Mon, Sep 29, 11:37 PM
Unknown Object (File)
Sun, Sep 28, 5:05 AM
Unknown Object (File)
Sep 11 2025, 10:15 AM
Unknown Object (File)
Sep 2 2025, 6:14 AM
Unknown Object (File)
Aug 31 2025, 1:29 AM
Subscribers

Details

Summary

These tests create a linked list with one entry for every group on the
running system. On a system with about 30,000 groups, the test took 69
seconds to run, and crashed Kyua with the below error:

kyua: E: string or blob too big (sqlite op: sqlite3_bind_blob) (sqlite db: /root/.kyua/store/results.usr_tests.20241231-203317-570235.db).

Fix the test by limiting it to operating on the first 1024 groups.
Apply the same change to getpw_test and getserv_test too, which are
vulnerable to the same problem.

MFC after: 2 weeks
Sponsored by: ConnectWise

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable