Bug 2559 - Warnings from reading moduli file, refer to primes file
Summary: Warnings from reading moduli file, refer to primes file
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 7.2p1
Hardware: Other Linux
: P5 enhancement
Assignee: Darren Tucker
URL:
Keywords:
Depends on:
Blocks: V_7_3
  Show dependency treegraph
 
Reported: 2016-03-30 23:22 AEDT by Dimitri John Ledkov
Modified: 2023-01-13 13:18 AEDT (History)
3 users (show)

See Also:


Attachments
moduli-primes-warnings.patch (1.57 KB, patch)
2016-03-30 23:22 AEDT, Dimitri John Ledkov
no flags Details | Diff
Remove /etc/primes fallback and fix moduli log messages (2.03 KB, patch)
2016-03-31 14:04 AEDT, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri John Ledkov 2016-03-30 23:22:43 AEDT
Created attachment 2801 [details]
moduli-primes-warnings.patch

Warnings about lack of moduli & primes files, refer to primes location only. Ditto, failing to find suitable prime in "moduli" file emits a warning that "no suitable primes" in "primes" file.

Attached patch keeps track of which file was opened moduli or primes, and correctly emits appropriate warnings.
Comment 1 Darren Tucker 2016-03-31 13:54:35 AEDT
diff looks ok, however the "primes" file was deprecated in 2001:

$ cvs log dh.c
[...]
revision 1.15
date: 2001/06/22 21:27:07;  author: provos;  state: Exp;  lines: +4 -4;
use /etc/moduli instead of /etc/primes, okay markus@

so I suspect we'd be better off just removing the fallback.  If you haven't updated in 15 years then logging a warning and falling back to the built-in groups is the least of your problems.

While there:
 logit("WARNING: %s does not exist, using fixed modulus", moduli_path);

While being missing is the most likely reason the open failed, it's not the only one.  While we're making it more accurate we should include the real reason too.
Comment 2 Darren Tucker 2016-03-31 14:04:46 AEDT
Created attachment 2802 [details]
Remove /etc/primes fallback and fix moduli log messages
Comment 3 Darren Tucker 2016-03-31 16:24:31 AEDT
patch applied and will be in 7.3.  Thanks.
Comment 4 Damien Miller 2016-08-02 10:40:35 AEST
Close all resolved bugs after 7.3p1 release