Mailing List Archive

Recent CVEs and libspf2 (and Debian)
Dear Exim users,

while the recent CVEs addressed some issues that existed in Exim, there
seems to be at least one issue that is related to a library we
potentially use.

ZDI-23-1472 | ZDI-CAN-17578 | CVE-2023-42118 | Exim Bug 3032

- https://bugs.exim.org/show_bug.cgi?id=3032
- https://www.zerodayinitiative.com/advisories/ZDI-23-1472/

Unfortunately we do not have any further details. But the libspf2 repo
on Github https://github.com/shevek/libspf2 contains at least one pull
request that potentially addresses the issue: https://github.com/shevek/libspf2/pull/44

IMHO a CVE should be created for that issue. Or the CVE-2023-42118
should be re-assigned to the libspf2.

So, if you do not want to disable the `spf` condition and `spf`
lookups in your Exim configuration, you could try to use a patched
version of the libspf2 library.

Dear Debian users: currently it doesn't seem as Debian provides a
patched version (because of the above mentioned uncertainty).

To patch my own systems built a libspf2 package containing the patch.
This package is *not officially supported*! Use it on your own risk. And
I do not promise any maintenance, updates, functionality, compatibility.
You're on your own using it. Please do not complain, if it breaks your
systems. But I'm happy about feedback.

- Git repo for `gbp`: https://gitea.schlittermann.de/DEB/libspf2
- Packages: https://apt.schlittermann.de/pool/main/libs/libspf2/

Hopefully this private hotfix will be outdated by official packages as soon as
possible.

Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: F69376CE -
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
Hi

this patch is based on 1.2.10, the latest version is 1.2.11, not sure
what the difference is but there might be something overlooked. The website

https://www.libspf2.org/

is 1.2.10 (seems not to be updated)

where github is the

https://github.com/shevek/libspf2

1.2.11

I believe 1.2.11 was launched in 2021.

On 10/4/2023 9:01 AM, Heiko Schlittermann via Exim-users wrote:
> Dear Exim users,
>
> while the recent CVEs addressed some issues that existed in Exim, there
> seems to be at least one issue that is related to a library we
> potentially use.
>
> ZDI-23-1472 | ZDI-CAN-17578 | CVE-2023-42118 | Exim Bug 3032
>
> - https://bugs.exim.org/show_bug.cgi?id=3032
> - https://www.zerodayinitiative.com/advisories/ZDI-23-1472/
>
> Unfortunately we do not have any further details. But the libspf2 repo
> on Github https://github.com/shevek/libspf2 contains at least one pull
> request that potentially addresses the issue: https://github.com/shevek/libspf2/pull/44
>
> IMHO a CVE should be created for that issue. Or the CVE-2023-42118
> should be re-assigned to the libspf2.
>
> So, if you do not want to disable the `spf` condition and `spf`
> lookups in your Exim configuration, you could try to use a patched
> version of the libspf2 library.
>
> Dear Debian users: currently it doesn't seem as Debian provides a
> patched version (because of the above mentioned uncertainty).
>
> To patch my own systems built a libspf2 package containing the patch.
> This package is *not officially supported*! Use it on your own risk. And
> I do not promise any maintenance, updates, functionality, compatibility.
> You're on your own using it. Please do not complain, if it breaks your
> systems. But I'm happy about feedback.
>
> - Git repo for `gbp`: https://gitea.schlittermann.de/DEB/libspf2
> - Packages: https://apt.schlittermann.de/pool/main/libs/libspf2/
>
> Hopefully this private hotfix will be outdated by official packages as soon as
> possible.
>
> Best regards from Dresden/Germany
> Viele Grüße aus Dresden
> Heiko Schlittermann
> --
> SCHLITTERMANN.de ---------------------------- internet & unix support -
> Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
> gnupg encrypted messages are welcome --------------- key ID: F69376CE -
>

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
Laura Williamson via Exim-users <exim-users@lists.exim.org> (Mi 04 Okt 2023 11:04:08 CEST):
> Hi
>
> this patch is based on 1.2.10, the latest version is 1.2.11, not sure what
> the difference is but there might be something overlooked. The website

Debian ships 1.2.10 for bookworm, probably backporting some changes that
appeared between 1.2.10, and 1.2.11.

Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: F69376CE -
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
Heiko Schlittermann via Exim-users <exim-users@lists.exim.org> (Mi 04 Okt 2023 10:01:03 CEST):
> - Git repo for `gbp`: https://gitea.schlittermann.de/DEB/libspf2
> - Packages: https://apt.schlittermann.de/pool/main/libs/libspf2/
Fixed again. My patch was broken. Credits to Lutz Pressler.
--
Heiko
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
D?a 4. októbra 2023 8:01:03 UTC používate? Heiko Schlittermann via Exim-users <exim-users@lists.exim.org> napísal:

>So, if you do not want to disable the `spf` condition and `spf`
>lookups in your Exim configuration, you could try to use a patched
>version of the libspf2 library.

Just curious, but libopendmarc2 uses libspf2. Is that bug
triggered by spf ACL condition/expansion only, or it happen
as part of DMARC check too? Or i mix unrelated things?

regards


--
Slavko
https://www.slavino.sk/

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
Slavko via Exim-users <exim-users@lists.exim.org> (Mi 04 Okt 2023 19:26:12 CEST):
> D?a 4. októbra 2023 8:01:03 UTC používate? Heiko Schlittermann via Exim-users <exim-users@lists.exim.org> napísal:
>
> >So, if you do not want to disable the `spf` condition and `spf`
> >lookups in your Exim configuration, you could try to use a patched
> >version of the libspf2 library.
>
> Just curious, but libopendmarc2 uses libspf2. Is that bug
> triggered by spf ACL condition/expansion only, or it happen
> as part of DMARC check too? Or i mix unrelated things?

Hm, maybe I'm confusing things, but the dmarc condition doesn't work
well if you do not use the spf condition first. So (but I may be totally
wrong), `dmarc = …` doesn't automatically call `spf = …`

Please correct me if I'm wrong.

Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: F69376CE -
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
D?a 4. októbra 2023 19:07:50 UTC používate? Heiko Schlittermann via Exim-users <exim-users@lists.exim.org> napísal:

>Hm, maybe I'm confusing things, but the dmarc condition doesn't work
>well if you do not use the spf condition first. So (but I may be totally
>wrong), `dmarc = …` doesn't automatically call `spf = …`
>
>Please correct me if I'm wrong.

Yes, you are right, at least docs says that. I do not use dmarc in exim,
as it is not included on debian, i play with it only, but it was relative
long time ago...

Anyway, it is surprise/unexpected for me. I would expect different
approach: using dmarc_status will trigger spf check, if it was not called
explicitly yet. Something as host lookup is triggered when one use
$sender_host_name.

regards


--
Slavko
https://www.slavino.sk/

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Recent CVEs and libspf2 (and Debian) [ In reply to ]
On 04/10/2023 10:01, Heiko Schlittermann via Exim-users wrote:

[about libspf2]

> while the recent CVEs addressed some issues that existed in Exim, there
> seems to be at least one issue that is related to a library we
> potentially use.
> ZDI-23-1472 | ZDI-CAN-17578 | CVE-2023-42118 | Exim Bug 3032

For users of Fedora and related distributions (including anything using EPEL),
there appear to be libspf2 package updates already available in testing
repositories; see https://bugzilla.redhat.com/show_bug.cgi?id=2241535 (follow
links to related bugs as appropriate).

Tim

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/