• Duplicated newsgroups in Xref header fields

    From =?UTF-8?Q?Julien_=C3=89LIE?=@iulius@nom-de-mon-site.com.invalid to news.software.nntp on Thu Nov 12 11:17:10 2026
    From Newsgroup: news.software.nntp

    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 |eLIE

    -2-aJe 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 |a fait la m|-me
    Ni tout |a fait une autre, et m'aime et me comprend.-a-+ (Paul Verlaine)

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Jesse Rehmer@jesse.rehmer@blueworldhosting.com to news.software.nntp on Thu Nov 12 19:11:11 2026
    From Newsgroup: news.software.nntp

    On Nov 12, 2026 at 4:17:10rC>AM CST, "Julien |eLIE" <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. ;-)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Julien_=C3=89LIE?=@iulius@nom-de-mon-site.com.invalid to news.software.nntp on Sat Nov 14 12:10:59 2026
    From Newsgroup: news.software.nntp

    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 |eLIE

    -2-aLe rire n'est jamais gratuit-a: l'homme donne |a pleurer mais pr|-te |a
    rire.-a-+ (Pierre Desproges)

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Jesse Rehmer@jesse.rehmer@blueworldhosting.com to news.software.nntp on Sun Nov 15 17:48:58 2026
    From Newsgroup: news.software.nntp

    On Nov 14, 2026 at 5:10:59rC>AM CST, "Julien |eLIE" <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.
    --- Synchronet 3.22a-Linux NewsLink 1.2