Why would you say it is "technically legal," when it is legal. It is not a gray area at all.
There are SBA guidelines on how much you can charge for packaging and there is even an SBA form that you submit in the loan closing paperwork to document the expense.