don't leak an interface reference in an error path in rport_set_parent().
if_unit takes an interface reference, but the ifp0 == ifp check
didn't release it. if you tried to add an rport as it's own parent
then you'd leak a ref and get stuck if you tried to destroy it in
the future.
found and fixed by tom smyth
Do not schedule sc_brtimeout timeout(9) while IFF_RUNNING flag is not
set on brigge interface. bridge_stop() does not disable timeout if
IFF_RUNNING flag is missing. Both bridgectl_ioctl() and bridge_rtage()
are kernel locked and bridge_rtage() has no sleep points, so
timeout_del() is enough in bridgectl_ioctl().
Reported by Tom Smyth. OK deraadt bluhm.
Move `sc_ifa' initialization after ether_ifattach() did if_sadl
allocation. Otherwise ifp->if_sadl is NULL and sdltosa(ifp->if_sadl)
causes NULL dereference.
Reported by Tom Smyth. OK claudio.
Reject any v1 CRL's
Go already does this, so this is likely low risk,
This is again a minimal change to catch this, easily
revertable. Code cleanup for the v1 stuff will follow
ok tb@
limit accesses to the plv2types array to the bounds of the array.
a value off the wire was used an index into this array, but wire values could exceed the number of entries in it.
report and fix from Acts1631
ok hshoexer
pass an explicit size to rev_in_string
In "plan a" the file is a mmap(2)'ed region which might not end with a
NUL character: rev_in_string() could then go reading out of bounds.
reported by acts1631
looks reasonable to millert@, okay kirill@
replace login_fbtab with the wscons group if the users is on the glass console
Historically login_fbtab(3) was called on user login to change permission
of devices for the user logging in on the console or xdm and this mechanism
had its quirks.
In in effort to make this better, introduce the LOGIN_SETWSCONSGROUP flag for
setusercontext(3), which will append the special wscons group to a user context
if the user is logging in on the "glass" console.
Callers of setusercontex(3) can also use the new login_wscons(const char *tty)
libutil function to determine if the tty is appropriate for setting the group.
The last part of this commit also changes the device node entries so that the
wscons group has write access to a specific list of devices that were previously
handled by fbtab, e.g. for amd64 (for other arches it might differ):
/dev/console
/dev/wskbd
[14 lines not shown]
Reject certificates that are not v3
X509 v1 is bloody ancient. we continue to have nasty things lurking
as corner cases to support it when there is really no need to.
Sadly, it has been kept around for ages for "roots" because of people
with old tests and nonsense that were generated for v1. v3 is required
by any modern certs.
Rather than supporting "tests" that aren't really testing what the real
world uses, stop the madness.
x509v3_cache_extensions marks any certificate whose version is not v3
invalid, so v1 and v2 certificates fail verification and purpose checks.
This may break tests suites generated with old junk. (we had one in
tree that I fixed before this).
We will see if this change is too painful to support in ports right now.
[4 lines not shown]
Ignore the Netscape certificate type extension
The 90's were amazing, but this is well past time to let it go.
x509v3_cache_extensions no longer reads nsCertType, so it no longer
makes a certificate a CA or restricts its purposes. A critical
nsCertType is now an unhandled critical extension.
This is only an initial defang, code removal for this will follow
ok tb@
Make openssl(1) always issue v3 certificates
change req -x509, x509 -req and ca to make every certificate they issue v3,
instead of issuing v1 when no extensions are configured.
openssl changed this visit from the bad idea bears back in 3.0 and we
never picked it up.
ok tb@