Just because something is accessible publicly doesn't mean it's suddenly legal to copy it, same as it isn't OK to go into someone's house just because the door was open. Unless you're police for some weird reasons.
Legally dubious in what sense? Leaking it might break trade secret protection, but afaik once it's public, it loses that protection, and the only one liable is the leaker. As far as I know, software per se is still not patentable even in the US since the actual source code is abstract mathematics, so it should be fine to publish the source (source code is fundamentally a detailed description of an algorithm, not a system implementing it), and there's effectively no way to stop an end-user from compiling and loading that source themselves. You could also distribute it from a more reasonable country like e.g. VLC does.
Anyone can then implement opensource driver based on that and distribute it freely, since NDA won't apply to them.