Tried the command line way to bypass the md5:

1. Install clamav on pristine jammy: `sudo apt update && sudo apt upgrade && 
sudo apt sintall clamav`
2. `clamscan -r /tmp` no error
3. Enable fips-updates channel via pro and reboot
4. `systemctl status clamav-freshclam.service`

```bash
May 26 10:25:22 sec-jammy-amd64 systemd[1]: Started ClamAV virus database 
updater.
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
ClamAV update process started at Mon May 26 10:25:22 2025
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
^Your ClamAV installation is OUTDATED!
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
^Local version: 0.103.12 Recommended version: 1.0.8
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
DON'T PANIC! Read https://docs.clamav.net/manual/Installing.html
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
daily.cvd database is up-to-date (version: 27649, sigs: 2075685, f-level: 90, 
builder: raynman)
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, 
builder: sigmgr)
May 26 10:25:22 sec-jammy-amd64 freshclam[3504]: Mon May 26 10:25:22 2025 -> 
bytecode.cvd database is up-to-date (version: 336, sigs: 83, f-level: 90, 
builder: nrandolp)
```

5. `clamscan -r /tmp`

```bash

LibClamAV Error: Can't load /var/lib/clamav/daily.cvd: Can't allocate memory
LibClamAV Error: cli_loaddbdir(): error loading database 
/var/lib/clamav/daily.cvd
ERROR: Can't allocate memory

----------- SCAN SUMMARY -----------
```

6. Install cvdupdate and update database: `sudo apt install clamav-cvdupdate && 
cvdupdate update`
7. `clamscan -rv -d ~/.cvdupdate/database/ /tmp`

```bash
LibClamAV Error: Can't load /home/am/.cvdupdate/database/daily.cvd: Can't 
allocate memory
LibClamAV Error: cli_loaddbdir(): error loading database 
/home/am/.cvdupdate/database/daily.cvd
ERROR: Can't allocate memory
```

8. Rename to .cld and rescan

```bash
mv ~/.cvdupdate/database/daily.cvd ~/.cvdupdate/database/daily.cld
mv  ~/.cvdupdate/database/bytecode.cvd ~/.cvdupdate/database/bytecode.cld
mv ~/.cvdupdate/database/main.cvd ~/.cvdupdate/database/main.cld
clamscan -rv -d ~/.cvdupdate/database/ /tmp
```

```bash
Scanning /tmp/.X1024-lock
LibClamAV Error: fmap_get_MD5: error initializing new md5 hash!
/tmp/.X1024-lock: OK
Scanning /tmp/.X0-lock
LibClamAV Error: fmap_get_MD5: error initializing new md5 hash!
/tmp/.X0-lock: OK
```

9. Editing freshclam.conf to set `TestDatabases no` (no effect)
10. `clamscan -rv -d ~/.cvdupdate/database/ /tmp --disable-cache` 

```bash
Scanning /tmp/.X1024-lock
LibClamAV Error: fmap_get_MD5: error initializing new md5 hash!
```

11. Debug output

```bash
Scanning /home/am/clamd.conf.sample
LibClamAV debug: Recognized ASCII text
LibClamAV Error: fmap_get_MD5: error initializing new md5 hash!
LibClamAV debug: cli_magic_scan: Failed to get a hash for the current fmap.
LibClamAV debug: cli_magic_scan_desc: returning 0  at line 4725
/home/am/clamd.conf.sample: OK
LibClamAV debug: Cleaning up phishcheck
LibClamAV debug: Freeing phishcheck struct
LibClamAV debug: Phishcheck cleaned up
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2106024

Title:
  Backport fix for Ubuntu 22.04 FIPS-enabled environments

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/2106024/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to