Thread View: news.software.nntp
4 messages
4 total messages
Started by Julien ÉLIE
Thu, 12 Nov 2026 10:17
Duplicated newsgroups in Xref header fields
Author: Julien ÉLIE
Date: Thu, 12 Nov 2026 10:17
Date: Thu, 12 Nov 2026 10:17
24 lines
2173 bytes
2173 bytes
Hi all, While reviewing a bug, a question arises: shouldn't repeated newsgroups in Xref header fields be considered as an error, and the article be rejected during both injection and relaying? Though repeats could also happen in other header fields like Newsgroups, this seems harmless; de-duplication will be done by the server or client when processing the header field. However, as for Xref, we expect the peer to have de-duplicated already, so repeats should not happen here, and are almost certainly an attack signature. Any thoughts about that? Has someone recently seen valid articles with duplicated Xref header fields? Digging into Jesse's archives could be interesting :-) -- Julien ÉLIE « Je fais souvent ce rêve étrange et pénétrant D'une femme inconnue, et que j'aime, et qui m'aime, Et qui n'est, chaque fois, ni tout à fait la même Ni tout à fait une autre, et m'aime et me comprend. » (Paul Verlaine)
Re: Duplicated newsgroups in Xref header fields
Author: Jesse Rehmer
Date: Thu, 12 Nov 2026 19:11
Date: Thu, 12 Nov 2026 19:11
68 lines
4433 bytes
4433 bytes
On Nov 12, 2026 at 4:17:10 AM CST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:
> Hi all,
>
> While reviewing a bug, a question arises: shouldn't repeated newsgroups
> in Xref header fields be considered as an error, and the article be
> rejected during both injection and relaying?
Injecting agents MUST reject an article with Xref.
https://www.faqs.org/rfcs/rfc5537.html:
It MUST reject any proto-article that does not have the proper
mandatory header fields for a proto-article, that has Injection-
Info or Xref header fields, that has a Path header field
containing the "POSTED" <diag-keyword>, or that is not
syntactically valid as defined by [RFC5536]. It SHOULD reject
any proto-article that contains a header field deprecated for
Netnews (see, for example, [RFC3798]). It MAY reject any proto-
article that contains trace header fields (e.g., NNTP-Posting-
Host) indicating that it was already injected by an injecting
agent that did not add Injection-Info or Injection-Date.
Relaying agents gets trickier, because it is not a requirement to remove Xref:
It MAY delete any Xref header field already present. It MAY add
a new Xref header field for its own use (but recall that
[RFC5536] permits at most one such header field).
With that, in my opinion, a transit server isn't required to strip or examine
Xref.
The serving agent is where Xref is typically generated and matters:
It MUST remove any Xref header field from each article (except
when specially configured to preserve the <article-locator>s set
by the sending site). It then MAY (and usually will) add a new
Xref header field (but recall that [RFC5536] permits at most one
such header field).
> Though repeats could also happen in other header fields like Newsgroups,
> this seems harmless; de-duplication will be done by the server or client
> when processing the header field. However, as for Xref, we expect the
> peer to have de-duplicated already, so repeats should not happen here,
> and are almost certainly an attack signature.
I would not expect a relaying agent to do anything with Xref because it is not
required.
> Any thoughts about that? Has someone recently seen valid articles with
> duplicated Xref header fields?
> Digging into Jesse's archives could be interesting :-)
Duplicate headers should be rejected by the injecting agent. It is less clear
to me what happens once articles have passed an injection agent with duplicate
headers.
In the case of duplicate newsgroups in the same Xref header... I am not seeing
anything that says the newsgroups have to be unique inside the header, but
also don't see how an article can have more than one article number per
newsgroup.
This isn't the most interesting area to me, but by all means, pull overview
data from my boxes and see what's there. I'm sure there are some interesting
examples for further discussion.
This sounds like a good task for go-while. ;-)
Re: Duplicated newsgroups in Xref header fields
Author: Julien ÉLIE
Date: Sat, 14 Nov 2026 11:10
Date: Sat, 14 Nov 2026 11:10
41 lines
2879 bytes
2879 bytes
Hi Jesse, >> While reviewing a bug, a question arises: shouldn't repeated newsgroups >> in Xref header fields be considered as an error, and the article be >> rejected during both injection and relaying? > > Injecting agents MUST reject an article with Xref. Indeed. My question was wrong; I shouldn't have spoken about roles, but only about syntax checks. > With that, in my opinion, a transit server isn't required to strip or examine > Xref. Yes, unless these transit servers also store articles or history. The use case is to have access to these articles to relay them to peers (and eventually delete them as soon as all the remote peers have accepted or rejected the articles sent). Programs like archive, expire, overchan or makehistory parse that field. When innd acts as a slave server, it also examines the Xref header field. > In the case of duplicate newsgroups in the same Xref header... I am not seeing > anything that says the newsgroups have to be unique inside the header, but > also don't see how an article can have more than one article number per > newsgroup. That's the point of my message. There shouldn't be such repeated newsgroups in the Xref header field. It could be a form of attack to trigger bugs. It is what we are currently examining with Billy G and Richard Kettlewell, thus the suggestion to harden a bit the allowed syntax of that header field. -- Julien ÉLIE « Le rire n'est jamais gratuit : l'homme donne à pleurer mais prête à rire. » (Pierre Desproges)
Re: Duplicated newsgroups in Xref header fields
Author: Jesse Rehmer
Date: Sun, 15 Nov 2026 17:48
Date: Sun, 15 Nov 2026 17:48
43 lines
3156 bytes
3156 bytes
On Nov 14, 2026 at 5:10:59 AM CST, "Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote: > Hi Jesse, > >>> While reviewing a bug, a question arises: shouldn't repeated newsgroups >>> in Xref header fields be considered as an error, and the article be >>> rejected during both injection and relaying? >> >> Injecting agents MUST reject an article with Xref. > > Indeed. My question was wrong; I shouldn't have spoken about roles, but > only about syntax checks. > > >> With that, in my opinion, a transit server isn't required to strip or examine >> Xref. > > Yes, unless these transit servers also store articles or history. The > use case is to have access to these articles to relay them to peers (and > eventually delete them as soon as all the remote peers have accepted or > rejected the articles sent). > > Programs like archive, expire, overchan or makehistory parse that field. > When innd acts as a slave server, it also examines the Xref header field. > > >> In the case of duplicate newsgroups in the same Xref header... I am not seeing >> anything that says the newsgroups have to be unique inside the header, but >> also don't see how an article can have more than one article number per >> newsgroup. > > That's the point of my message. There shouldn't be such repeated > newsgroups in the Xref header field. It could be a form of attack to > trigger bugs. It is what we are currently examining with Billy G and > Richard Kettlewell, thus the suggestion to harden a bit the allowed > syntax of that header field. Understood, I would expect such a header to come from a broken implementation, or as you said, some form of abuse. I didn't try hard, but couldn't get software I use to create such a Xref header.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads