There are two levels of Ethics: Constitutionality and Beneficiality. [1] A constitutional action is such that is allowed under objective ethics. I.e: if you wish to perform it, then no-one can prevent you from doing it. It may not necessarily be a good action to take, but it is still allowed. A non-constitutional action is such that will harm others and so is not allowed.
Now a constitutional action is beneficial if it delivers genuine gain for you or for someone else. This distinction should be made because some constitutional actions are very harmful (such as commiting suicide or consuming harmful substances).
The aim of this chapter is to show that working on open source software is not only constitutional but beneficial as well.
The best summary of what is constitutional and what isn't can be found in the Neo-Tech Constitution. This document contains a preamble, followed by three articles, followed by 6 axioms. The articles are the most relevant and I'll bring them here:
No person, group of persons, or government may initiate force, threat of force, or fraud against the person or property of any individual.
Force may be morally and legally used only in defense against those who violate Article 1.
No exception shall ever exist to Articles 1 & 2.
The validity of this definition is self-evident. Now, based on it, what can we say about creating open-source software? It surely does not involve initiatory force, coercion or fraud. Working on free software is done voluntarily and its distribution does not involve harming anyone.
While vendors of commercial software may lose money or go out of business out of competition with open-source software, it does not constitute of force. Competition is one of the cornerstones of Capitalism. This is similar to selling a cheaper and/or better product at the marketplace and taking market share out of the competition.
Thus, creating and maintaining open source software is a constitutional action.
[1] I usually think about them as "legality" and "morality" respectively. However to make this document more accessible I'll use these two less ambigious terms.