Yes, it's ethical to have students work on your research interests
The core idea of research mentorship is that it's useful for people to collaborate, and for professors to 'split off' interesting, manageable chunks of research directions for others to handle - either as part of study projects or research grants. Pretty much always it will be related to topics that interest the professor personally, and it's okay.
I believe that most researchers have a list of subproblems that they aren't going to do themselves, but for which they'd like a solution and a student research project could [attempt to] to solve it. I have such a list myself, students are happy that it exists, but most of them do have some use case where the thesis outcome (data/tool/method/etc) would be directly useful to me personally in my research.
If the student wants to work on X, and the professor says "you must do topic Y", then that would be unethical unless there's funding/employment agreement for the student to do Y. However, if student "needs" a thesis topic and is okay with doing Y, then it's ethical to recommend topics that aren't "neutral"(which would that be?) but are of personal interest to you.
Yes, it's ethical for your research interests to benefit you commercially
Turning academic research into commercial spinoffs isn't an unwanted exploitation - in fact, it generally is the explicit wish of the universities, funding agencies and government research policies to facilitate commercialization and implementation of research.
If a professor has ideas on how particular research topics can be applied commercially, then it's a good thing - it estabilishes that the topic is meaningful and provides a real world context to otherwise abstract notions.
Having the research benefit your business as such is okay, given the university approval for that spinoff, but there may be ethical concerns with how it's done.
Is he coercing students to work in that direction?
Are there signs of coercion - i.e., do students feel threatened that if they choose an unrelated topic then they'd be treated differently, get different grading, etc?
Is he recommending students to work on bad / non-research topics?
Are the recommended projects ("algorithmic modules for the open-source software") a good fit for the master thesis requirements of your university?
If software engineering and algorithmic implementation are valid and recommended goals for thesis in your particular master's program (it often is), then it's ethical.
If that study program expects students to focus on academic research during the thesis, but in those projects students spend 90% time on software engineering and thus either produce poor thesis or have to spend huge work that's not beneficial to the thesis, then that would be giving misleading and hurtful advice and it's not ethical.
Is he stealing intellectual property?
If copyrighted or patentable items are created by the students (such as software) as part of their academic work, are they either (a) freely available to the public; (b) clearly owned by the student; or (c) purchased as a separate agreement or through an employment contract for the time of developing it?
Publishing work results on an open source project would be ethical; a company using public and published results of student's work is also clearly okay.
Publishing work results on a dual-licenced project where the student's code is available, say, as GPL to the public and also the same student's code as a closed source licence for a fee from the company raises the question on how does the student licenced the code to that company. A scenario where work is done on "university time", and the company simply takes the not-public work without compensating the author would be unethical.
Is he hiding his vested interest in that particular project?
Is he disclosing that he has a commercial interest in this open source project to the students? If he's not telling them it when offering the topics, then it would be unethical.