mail/postfix: Missing TLS certificate verification for upstream SMTP authentication

オープン
#5,986 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php

調査の方向性

Start with the Postfix model at mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/General.xml and the main.cf template at mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/main.cf. Check how TLS security levels and SMTP authentication settings are exposed and generated, then compare them with the Postfix TLS and SASL requirements cited in the issue. Done means the plugin provides authenticated TLS options and handles upstream authentication consistently with those requirements.

索引モデルが issue の本文から書いたものです。

説明

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

First off, thanks for all the great work! This is more of a security-relevant configuration limitation than a bug.

I was about to set up the Postfix plugin (for the first time), but noticed it currently exposes only none, may, encrypt and dane as SMTP client TLS security levels. See here.

The encrypt security level requires encryption but does not require successful certificate or hostname verification. When SMTP authentication is enabled, this can expose SMTP credentials to an active man-in-the-middle attacker.

Enabling TLS without server authentication is not sufficiently secure in this context. See postfix docs.

Even though TLS encryption is always used, mail delivery continues even if the server certificate is untrusted or bears the wrong name.

The plugin's main.cf template also clears smtp_sasl_security_options when upstream SMTP authentication is enabled, allowing plaintext authentication mechanisms such as SASL PLAIN.

Using SASL PLAIN with the encrypt security level is at odds with RFC 4954, Section 14, which requires successful server certificate and hostname verification before authentication. See RFC4954.

If the server has not provided any certificate, or if the certificate verification fails, the client MUST NOT attempt to authenticate using the SASL PLAIN mechanism.

I didn't try to override the config because this open issue reports that modifications to the main.cf template are overwritten on every upgrade.

Please consider exposing the verify and secure TLS security levels and enforcing or recommending authenticated TLS when upstream SMTP authentication is enabled. This would protect SMTP credentials against server impersonation.

Additional context

This report is based on looking for the option, followed by source-code inspection and the documented behavior of Postfix. I have not reproduced credential disclosure in a live environment.

Environment

OPNsense 26.7.10

主要言語
PHP
スター
1.2k
フォーク
932
平均マージ
1日 11時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opnsense/plugins のほかの issue

opnsense/plugins の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。