Skip to content

Segfault while using "Minimum 100%" in opendkim.conf #222

Open
@andreasschulze

Description

@andreasschulze

The config option "Minimum" can be set to "100%". Rationale: I do not want partial signed messages.
This setting worked well until someone sent a message with no body at all. Then, OpenDKIM fail.

The reason is probably this code

pct = (100 * canonlen) / bodylen;
if (pct < "100")
	status = DKIMF_STATUS_PARTIAL;

no body mean bodylen == 0 -> division by zero -> boom
(but it's not verified by a debugger or stack trace)

Fortunately, the code allow other ways to express the same "I do not want partial signed messages":

  • "Minimum" can be set to "0+" which allow no more the 0 unsigned bytes.
  • "Minimum" can be set to an huge number larger then any maximum message size which require "all" must be signed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions