Even though the versions of OpenSSL in Ubuntu correspond to older versions, they are patched to include fixes for known security issues.
For example, in 20.04 (the latest LTS):
openssl (1.1.1f-1ubuntu2.12) focal-security; urgency=medium
- SECURITY UPDATE: Infinite loop in BN_mod_sqrt()
- debian/patches/CVE-2022-0778-1.patch: fix infinite loop in
crypto/bn/bn_sqrt.c.
- debian/patches/CVE-2022-0778-2.patch: add documentation of
BN_mod_sqrt() in doc/man3/BN_add.pod.
- debian/patches/CVE-2022-0778-3.patch: add a negative testcase for
BN_mod_sqrt in test/bntest.c, test/recipes/10-test_bn_data/bnmod.txt.
- CVE-2022-0778
In 21.10 (the latest release):
openssl (1.1.1l-1ubuntu1.2) impish-security; urgency=medium
- SECURITY UPDATE: Infinite loop in BN_mod_sqrt()
- debian/patches/CVE-2022-0778-1.patch: fix infinite loop in
crypto/bn/bn_sqrt.c.
- debian/patches/CVE-2022-0778-2.patch: add documentation of
BN_mod_sqrt() in doc/man3/BN_add.pod.
- debian/patches/CVE-2022-0778-3.patch: add a negative testcase for
BN_mod_sqrt in test/bntest.c, test/recipes/10-test_bn_data/bnmod.txt.
- CVE-2022-0778
See also the corresponding security notice.
On supported releases of Ubuntu (and other distributions), you shouldn’t ever need to build software yourself to address security issues, as long as you keep your installations updated.
openssl
will still say it is 1.1.1f, even though it has the security fixes for CVE-2022-0778. Ifdpkg -l libssl1.1
reports version 1.1.1f-1ubuntu2.12, you’re fine. – Stephen Kitt Mar 22 '22 at 17:20libssl1.1
1.1.1-1ubuntu2.1~18.04.15 for 18.04. Your output is truncated, but you should be safe. – Stephen Kitt Mar 22 '22 at 18:09