injected body trailers
Hi!
So, I just saw a DKIM failure, and it was entirely justified. :)
Grabbing thread from lore.kernel.org/all/20211021142516.1843042-1-ardb%40kernel.org/t.mbox.gz Checking for newer revisions on https://lore.kernel.org/all/
Analyzing 1 messages in the thread
Checking attestation on all messages, may take a moment...
---
✓ [PATCH] ARM: stackprotector: prefer compiler for TLS based per-task protector
✓ Signed: openpgp/[email protected]
✗ BADSIG: DKIM/kernel.org
✓ Signed: DKIM/lists.infradead.org (From: [email protected])
---
This is https://lore.kernel.org/all/[email protected]/
and for some reason, the linux-arm-kernel mailing list is injecting a body trailer.
I just downloaded this directly and removed the trailer, and the DKIM passed. This experience has raise a few questions...
1) Can (should) b4 grow logic to progressively strip lines off the end of a body until DKIM passes?
2) Can the linux-arm-kernel mailing list please stop breaking DKIM? Who should authorize this change (rmk, Catalin)? And who can make the change (peterz)?
(I realize now that all the mail from linux-arm-kernel has been getting dropped into my Spam folder -- I normally don't notice since I'm usually CCed directly or via some other list on things I wanted to see.)
3) Are there other lists for which lore is collecting emails where DKIM is persistently broken, and can we fix those lists too?
Thoughts?
-Kees
Signature · 1 line
Kees Cook
Quoted 11 lines · Kees Cook
Hi!
So, I just saw a DKIM failure, and it was entirely justified. :)
Grabbing thread from lore.kernel.org/all/20211021142516.1843042-1-ardb%40kernel.org/t.mbox.gz Checking for newer revisions on https://lore.kernel.org/all/
Analyzing 1 messages in the thread
Checking attestation on all messages, may take a moment...
---
✓ [PATCH] ARM: stackprotector: prefer compiler for TLS based per-task protector
✓ Signed: openpgp/[email protected]
You will notice that the openpgp signature passed. This is because we:
1. record the length of the original message when we're creating the signature (see l=2495 in X-Developer-Signature)
2. if the initial validation fails and the body is longer than l=2495, we trim the body to that number of bytes
3. if the trimmed validation passes, we use that version for the patch body content, since that's clearly what the developer intended
Quoted 7 lines
✗ BADSIG: DKIM/kernel.org
✓ Signed: DKIM/lists.infradead.org (From: [email protected])
---This is https://lore.kernel.org/all/[email protected]/
and for some reason, the linux-arm-kernel mailing list is injecting a body trailer.
"For some reason" is really "that's the default for mailman-2". Mailman-2 belongs to a wholly different era and *can* be configured to be DKIM compliant, but rarely is.
Quoted 5 lines
I just downloaded this directly and removed the trailer, and the DKIM passed. This experience has raise a few questions...
1) Can (should) b4 grow logic to progressively strip lines off the end of a body until DKIM passes?
Ah, but then the lists.infradead.org DKIM will fail. Theoretically, we should always prioritize the signature that is closest aligned with the From: header, but that's not actually that straightforward, as DNS lookup and validation rules can get really complex.
Quoted 3 lines
2) Can the linux-arm-kernel mailing list please stop breaking DKIM? Who should authorize this change (rmk, Catalin)? And who can make the change (peterz)?
The relevant settings should be a) don't add any subject prefixes, b) don't add anything to the body trailers, c) don't rewrite any other headers (to, cc, reply-to, etc).
Quoted 7 lines
(I realize now that all the mail from linux-arm-kernel has been getting dropped into my Spam folder -- I normally don't notice since I'm usually CCed directly or via some other list on things I wanted to see.)
3) Are there other lists for which lore is collecting emails where DKIM is persistently broken, and can we fix those lists too?
I would also note that lists.infradead.org should not really be adding its own DKIM signature to messages it sends out. It doesn't really serve any purpose unless the From: header is rewritten (but please don't do that either).
-K
Quoted 13 lines · Konstantin Ryabitsev
Quoted 11 lines · Kees Cook
Hi!
So, I just saw a DKIM failure, and it was entirely justified. :)
Grabbing thread from lore.kernel.org/all/20211021142516.1843042-1-ardb%40kernel.org/t.mbox.gz Checking for newer revisions on https://lore.kernel.org/all/
Analyzing 1 messages in the thread
Checking attestation on all messages, may take a moment...
---
✓ [PATCH] ARM: stackprotector: prefer compiler for TLS based per-task protector
✓ Signed: openpgp/[email protected]
Quoted 8 lines
You will notice that the openpgp signature passed. This is because we:
1. record the length of the original message when we're creating the signature (see l=2495 in X-Developer-Signature)
2. if the initial validation fails and the body is longer than l=2495, we trim the body to that number of bytes
3. if the trimmed validation passes, we use that version for the patch body content, since that's clearly what the developer intended
I suspected something like this was happening to make that one pass. Nice.
Quoted 16 lines
Quoted 8 lines
✗ BADSIG: DKIM/kernel.org
✓ Signed: DKIM/lists.infradead.org (From: [email protected])
---This is https://lore.kernel.org/all/[email protected]/
and for some reason, the linux-arm-kernel mailing list is injecting a body trailer."For some reason" is really "that's the default for mailman-2". Mailman-2 belongs to a wholly different era and *can* be configured to be DKIM compliant, but rarely is.
Quoted 3 lines
I just downloaded this directly and removed the trailer, and the DKIM passed. This experience has raise a few questions...
Quoted 7 lines
Quoted 2 lines
1) Can (should) b4 grow logic to progressively strip lines off the end of a body until DKIM passes?
Ah, but then the lists.infradead.org DKIM will fail. Theoretically, we should always prioritize the signature that is closest aligned with the From: header, but that's not actually that straightforward, as DNS lookup and validation rules can get really complex.
Could each signature validation independently process the body, with the smallest signed body being what is "produced"? i.e. GPG already self-trims. DKIM could do the same, trying to find a matching body i.e. on failure (slow path), trying trimming up to 10(?) lines progressively looking for a match?
(Probably better is to just fix the mailing lists, but maybe this would be useful for historical patch extraction? Dunno.)
Quoted 8 lines
Quoted 4 lines
2) Can the linux-arm-kernel mailing list please stop breaking DKIM? Who should authorize this change (rmk, Catalin)? And who can make the change (peterz)?
The relevant settings should be a) don't add any subject prefixes, b) don't add anything to the body trailers, c) don't rewrite any other headers (to, cc, reply-to, etc).
rmk, Catalin, Peter, can this get sorted out? Having mailing list trailers is annoying beyond just DKIM breakage. :)
Quoted 6 lines
Quoted 6 lines
(I realize now that all the mail from linux-arm-kernel has been getting dropped into my Spam folder -- I normally don't notice since I'm usually CCed directly or via some other list on things I wanted to see.)
Quoted 6 lines
Quoted 2 lines
3) Are there other lists for which lore is collecting emails where DKIM is persistently broken, and can we fix those lists too?
I would also note that lists.infradead.org should not really be adding its own DKIM signature to messages it sends out. It doesn't really serve any purpose unless the From: header is rewritten (but please don't do that either).
-Kees
Signature · 1 line
Kees Cook
Quoted 6 lines · Kees Cook
Quoted 5 lines · Konstantin Ryabitsev
Quoted 3 lines · Kees Cook
2) Can the linux-arm-kernel mailing list please stop breaking DKIM? Who should authorize this change (rmk, Catalin)? And who can make the change (peterz)?
Quoted 6 lines
Quoted 3 lines
The relevant settings should be a) don't add any subject prefixes, b) don't add anything to the body trailers, c) don't rewrite any other headers (to, cc, reply-to, etc).
rmk, Catalin, Peter, can this get sorted out? Having mailing list trailers is annoying beyond just DKIM breakage. :)
That would be dwmw2, cc'ed.
Signature · 1 line
Catalin
Quoted 17 lines · Konstantin Ryabitsev
Quoted 8 lines · Kees Cook
Hi!
So, I just saw a DKIM failure, and it was entirely justified. :)
Grabbing thread from lore.kernel.org/all/20211021142516.1843042-1-ardb%40kernel.org/t.mbox.gz Checking for newer revisions on
https://lore.kernel.org/all/Quoted 7 lines
Analyzing 1 messages in the thread
Checking attestation on all messages, may take a moment...
---
✓ [PATCH] ARM: stackprotector: prefer compiler for TLS based per-task protector
✓ Signed: openpgp/
[email protected]
Quoted 9 lines
You will notice that the openpgp signature passed. This is because we:
1. record the length of the original message when we're creating the signature (see l=2495 in X-Developer-Signature)
2. if the initial validation fails and the body is longer than l=2495, we trim the body to that number of bytes
3. if the trimmed validation passes, we use that version for the patch body content, since that's clearly what the developer intended
All this was known when DKIM was first invented, and the fact that DKIM signatures would break with fairly much all mailing lists was also known, the moment they decided to go ahead with DKIM in its current state without any solution for it.
Quoted 2 lines
Quoted 2 lines
✗ BADSIG: DKIM/kernel.org
✓ Signed: DKIM/lists.infradead.org (From: [email protected])
Hm. I thought I had configured mailman to *remove* older DKIM signatures (which are going to be broken). The message you receive should *only* have the newly-added signature corresponding to the
Sender: of the message. The original one was superseded by the new one and should have been removed.
Quoted 11 lines
Quoted 6 lines
This is
https://lore.kernel.org/all/[email protected]/and for some reason, the linux-arm-kernel mailing list is injecting a body trailer.
"For some reason" is really "that's the default for mailman-2". Mailman-2 belongs to a wholly different era and *can* be configured to be DKIM compliant, but rarely is.
That's what mailing lists have always done, because users are stupid and need to be reminded in *every* single message that this is a mailing list and this is how they unsubscribe. Really, even *with* that reminder there are plenty of people who can't work it out.
Quoted 11 lines
Quoted 5 lines
I just downloaded this directly and removed the trailer, and the DKIM passed. This experience has raise a few questions...
1) Can (should) b4 grow logic to progressively strip lines off the end of a body until DKIM passes?
Ah, but then the lists.infradead.org DKIM will fail. Theoretically, we should always prioritize the signature that is closest aligned with the From: header, but that's not actually that straightforward, as DNS lookup and validation rules can get really complex.
Surely the Sender: header should take priority. That one would work.
Quoted 4 lines
Quoted 3 lines
2) Can the linux-arm-kernel mailing list please stop breaking DKIM? Who should authorize this change (rmk, Catalin)? And who can make the change (peterz)?
I run the host but per-list settings are up to the admin of the individual list. For the lak list, [email protected] and [email protected] are listed as admins. I don't know if that corresponds with who actually remembers the list password these days; I can set a new one and provide it if that's helpful.
Quoted 9 lines
The relevant settings should be a) don't add any subject prefixes, b) don't add anything to the body trailers, c) don't rewrite any other headers (to, cc, reply-to, etc).
Quoted 5 lines
(I realize now that all the mail from linux-arm-kernel has been getting dropped into my Spam folder -- I normally don't notice since I'm usually CCed directly or via some other list on things I wanted to see.)
Quoted 6 lines
Quoted 2 lines
3) Are there other lists for which lore is collecting emails where DKIM is persistently broken, and can we fix those lists too?
I would also note that lists.infradead.org should not really be adding its own DKIM signature to messages it sends out. It doesn't really serve any purpose unless the From: header is rewritten (but please don't do that either).
No, it matches the Sender: header, which is the entity that actually submitted the mail to the system (as opposed to the possibly multiple entities listed in the From: header, which are merely authors of the message).
Quoted 8 lines · David Woodhouse
Quoted 8 lines
Quoted 7 lines
(I realize now that all the mail from linux-arm-kernel has been getting dropped into my Spam folder -- I normally don't notice since I'm usually CCed directly or via some other list on things I wanted to see.)
3) Are there other lists for which lore is collecting emails where DKIM is persistently broken, and can we fix those lists too?
Quoted 8 lines
Quoted 3 lines
I would also note that lists.infradead.org should not really be adding its own DKIM signature to messages it sends out. It doesn't really serve any purpose unless the From: header is rewritten (but please don't do that either).
No, it matches the Sender: header, which is the entity that actually submitted the mail to the system (as opposed to the possibly multiple entities listed in the From: header, which are merely authors of the message).
I know that's how it was envisioned to work (it's in the DKIM RFC as recommendation for mailing list operators), but this didn't make it into the DMARC standard -- DMARC intentionally ignores the Sender: header and will *always* look at the From: header when performing DKIM validation.
(https://datatracker.ietf.org/doc/html/rfc7489#appendix-A.3)
It was a bad idea in the first place, if you think about it. I can take any message, add a Sender: header for the domain that I control and force the validating system to check the DKIM-Signature header that I injected instead of the signature from the originating domain, thus making any message I touch pass DMARC verification.
So, I have to double-down on my statement that adding a lists.infradead.org DKIM signature doesn't actually serve any purpose, at least not when it comes to appeasing DMARC filters.
-K
Quoted 1 line · Konstantin Ryabitsev
thus making any message I touch pass DMARC verification.
Er… "thus making any message I *send* pass DMARC verification".
The Sender is the entity who sends the message. Who submits the message to the mail system for transport. The Sender in this case is Mailman, and the DKIM signature correctly passes verification.
All else is based on a fundamental misunderstanding of what the Sender:
and From: headers actually mean.
Quoted 11 lines · David Woodhouse
Quoted 1 line
thus making any message I touch pass DMARC verification.
Er… "thus making any message I *send* pass DMARC verification".
The Sender is the entity who sends the message. Who submits the message to the mail system for transport. The Sender in this case is Mailman, and the DKIM signature correctly passes verification.
All else is based on a fundamental misunderstanding of what the Sender:
and From: headers actually mean.
David, I'm happy to argue whether this makes sense or not, but the fact of the matter remains that DMARC specifically ignores the Sender: header, so any email gateway performing DMARC validation will mark messages sent by lists.infradead.org as failing the check. Unfortunately, anti-phishing policies at many companies increasingly quarantine or reject messages failing DMARC verification, so DMARC non-compliant mail will be increasingly not received by list subscribers.
DMARC and mailing lists are not mutually incompatible, but to make it work correctly the list operators must either not touch the message bodies and any pre-existing headers, or rewrite From: to be coming from the mailing list domain. In the context of patches, I would strongly argue that the former is the only reasonable solution.
-K
Quoted 21 lines · Konstantin Ryabitsev
Quoted 11 lines · David Woodhouse
Quoted 1 line
thus making any message I touch pass DMARC verification.
Er… "thus making any message I *send* pass DMARC verification".
The Sender is the entity who sends the message. Who submits the message to the mail system for transport. The Sender in this case is Mailman, and the DKIM signature correctly passes verification.
All else is based on a fundamental misunderstanding of what the Sender:
and From: headers actually mean.David, I'm happy to argue whether this makes sense or not, but the fact of the matter remains that DMARC specifically ignores the Sender: header, so any email gateway performing DMARC validation will mark messages sent by lists.infradead.org as failing the check. Unfortunately, anti-phishing policies at many companies increasingly quarantine or reject messages failing DMARC verification, so DMARC non-compliant mail will be increasingly not received by list subscribers.
Quoted 5 lines
DMARC and mailing lists are not mutually incompatible, but to make it work correctly the list operators must either not touch the message bodies and any pre-existing headers, or rewrite From: to be coming from the mailing list domain. In the context of patches, I would strongly argue that the former is the only reasonable solution.
The only reasonable solution to the fact that DKIM/DMARC is fundamentally misdesigned, and failed to adopt any of the known workarounds that were being floated during its inception? That like so many of the other email snake oil "solutions", it required widescale changes in how email operates in the real world, in order to make its false assumptions come true?
I would posit that another reasonable "solution" to that problem is *not* to pander to its stupidity, but instead just declare it "yet another bad idea on the Internet" and ignore it.
But it's up to the owner of the individual mailing list. Nothing prevents them from configuring it as DMARC demands. Unless they've forgotten the list password, in which case I can reset it for them.
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Quoted 5 lines · David Woodhouse
I run the host but per-list settings are up to the admin of the individual list. For the lak list, [email protected] and [email protected] are listed as admins. I don't know if that corresponds with who actually remembers the list password these days; I can set a new one and provide it if that's helpful.
$ grep -Ei '(kyllikki|mouw@)' MAINTAINERS .mailmap | wc -l 0 $ grep [email protected] MAINTAINERS | wc -l 157
How about we reset that password and make the following folks the list admins, assuming they're interested:
ARM PORT
M: Russell King <[email protected]>
ARM64 PORT (AARCH64 ARCHITECTURE)
M: Catalin Marinas <[email protected]> M: Will Deacon <[email protected]>
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <[email protected]> M: Olof Johansson <[email protected]>
Signature · 1 line
Kees Cook
Quoted 12 lines · Kees Cook
Quoted 5 lines · David Woodhouse
I run the host but per-list settings are up to the admin of the individual list. For the lak list, [email protected] and [email protected] are listed as admins. I don't know if that corresponds with who actually remembers the list password these days; I can set a new one and provide it if that's helpful.
$ grep -Ei '(kyllikki|mouw@)' MAINTAINERS .mailmap | wc -l 0 $ grep [email protected] MAINTAINERS | wc -l 157
Quoted 5 lines
How about we reset that password and make the following folks the list admins, assuming they're interested:
ARM PORT
M: Russell King <[email protected]>
No thanks.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Quoted 5 lines · Kees Cook
On Thu, Oct 21, 2021 at 10:42:46PM +0100, David Woodhouse wrote:
How about we reset that password and make the following folks the list admins, assuming they're interested:
Quoted 7 lines
ARM64 PORT (AARCH64 ARCHITECTURE)
M: Catalin Marinas <[email protected]> M: Will Deacon <[email protected]>ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <[email protected]> M: Olof Johansson <[email protected]>
Fine with me, as long as I'm not the only one.
Arnd
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · Kees Cook
On Thu, Oct 21, 2021 at 10:42:46PM +0100, David Woodhouse wrote:
How about we reset that password and make the following folks the list admins, assuming they're interested:
ARM64 PORT (AARCH64 ARCHITECTURE)
M: Catalin Marinas <[email protected]> M: Will Deacon <[email protected]>
Quoted 6 lines
Quoted 3 lines
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <[email protected]> M: Olof Johansson <[email protected]>Fine with me, as long as I'm not the only one.
I'm happy to help out if needed.
Quoted 12 lines · Ard Biesheuvel
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · Kees Cook
On Thu, Oct 21, 2021 at 10:42:46PM +0100, David Woodhouse wrote:
How about we reset that password and make the following folks the list admins, assuming they're interested:
ARM64 PORT (AARCH64 ARCHITECTURE)
M: Catalin Marinas <[email protected]> M: Will Deacon <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <[email protected]> M: Olof Johansson <[email protected]>Fine with me, as long as I'm not the only one.
I'm happy to help out if needed.
Same here.
Signature · 1 line
Catalin
Quoted 17 lines · Catalin Marinas
Quoted 16 lines · Ard Biesheuvel
Quoted 15 lines · Arnd Bergmann
Quoted 12 lines · Kees Cook
On Thu, Oct 21, 2021 at 10:42:46PM +0100, David Woodhouse wrote:
How about we reset that password and make the following folks the list admins, assuming they're interested:
ARM64 PORT (AARCH64 ARCHITECTURE)
M: Catalin Marinas <[email protected]> M: Will Deacon <[email protected]>ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <[email protected]> M: Olof Johansson <[email protected]>
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Fine with me, as long as I'm not the only one.
I'm happy to help out if needed.
Same here.
Likewise, with the disclaimer that I haven't helped to manage a mailing list before!
An alternative would be to move the list to vger, but I suspect that's far too invasive.
Will
Quoted 7 lines · Kees Cook
2) Can the linux-arm-kernel mailing list please stop breaking DKIM? Who should authorize this change (rmk, Catalin)? And who can make the change (peterz)?
(I realize now that all the mail from linux-arm-kernel has been getting dropped into my Spam folder -- I normally don't notice since I'm usually CCed directly or via some other list on things I wanted to see.)
The lists are nothing to do with me. I also stopped tracking who looks after the lists; I've always asked dwmw2 when there's been some problem because he's responsible for infradead.org.
Signature · 7 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel