New in 3.7p1 and above, if the banner file is missing then sshd will send a banner to an SSH2 client, containing a newline. auth2_read_banner() correctly returns a NULL if the file is missing, but this is lost in the privsep: if in auth2-none.c the PRIVSEP() is removed from auth2_read_banner() then everything works fine. Upon further analysis I came to the conclusion that mm_answer_auth2_read_banner() will return either a banner string, or an empty string. It will never return NULL, so presumably mm_auth2_read_banner() will also never return NULL to its caller in userauth_banner(). A patch will be attached. It could be better. And a better solution is to just not point UseBanner to an non-existant file!
Created attachment 459 [details] patch
This has been fixed in OpenBSD and will appear in -Portable's snapshots shortly.
Mass change of RESOLVED bugs to CLOSED