Can you elaborate on this? Are you saying a fully patched FreeNAS machine with only SSH running (serving files over SFTP) has unfixed remote code vulnerabilities that can be exploited from the same LAN?
Sure, if you want to put words I didn't actually say into my mouth.
If you want to listen to what I actually said, though, anyone with layer 2 access to an Ethernet is able to screw up a network pretty badly, including confusing other hosts who are trying to communicate with the NAS into sending to an alternative MAC address, an attack which has significant potential to gain access to data that one shouldn't have the ability to access, or tricking the NAS in a similar manner. This has the potential for all sorts of issues, and is basically a design flaw in IPv4.
https://en.wikipedia.org/wiki/ARP_spoofing
This turns out to be a real problem in environments where multiple tenants have shared access to an L2 broadcast domain, so devices such as cable modems, hypervisors, etc., typically have the ability to selectively disable "forged transmits" and "promiscuous mode", which are two elements involved in the security considerations of IPv4 networking.
Relatively speaking, this allows for an immense amount of inadvertent data exposure, especially since NAS protocols are typically unencrypted, your weird example of SFTP notwithstanding.
If so, can you point me to information on this? I'm assuming that's what you're meaning by any "mode", given, code execution is a possible threat from the above CVE. If that is not what you meant, can you clarify?
As a security person, the question you have to ask yourself is "what is the attack surface like"?
You mentioned SFTP running over SSH because SSH is generally not terrible from a security perspective. It hasn't had a lot of remote code exploits over the years, but that number isn't zero. One of the big things for experienced security people is not to put all your eggs in one basket; being overly concerned about "code execution" without also designing a system that is designed to minimize the danger of code execution is stupid. Our Internet-facing SSH gateways here run in a /bin/sh-less jailed read-only environment, and are firewalled so that the bastion hosts they run on can only reach inward to specific hosts. I do not live in terror of a code execution exploit for our SSH gateways, because at most you'd only get in to the bastion host, which isn't a big deal. The attack footprint is minimal, specific, and carefully monitored.
By way of comparison, FreeNAS is listening on a crapton of ports, running a huge amount of diverse software, has no onboard firewall, and has middleware written by developers who have explicitly stated in the past that they do not expect FreeNAS to be exposed directly to the Internet, and have cautioned against it. Try it, "netstat -an" is your friend.
From this, the smart advice is not to place a FreeNAS host on a shared tenancy network segment, whether just "raw Internet" or a cloud host or whatever. You don't know if the platform itself is truly secure, you know for sure that the network itself isn't secure, so the smart move is to make sure that only systems you control can access the NAS directly.
Additionally, given the role that a NAS plays in many organizations, reboots for random security patches may not be practical. A classic example is use of a NAS for iSCSI or NFS VM datastores, where an outage is unacceptable, and any planned update may require a days-long evacuation of the datastore to a standby unit. This is hardly unique to FreeNAS.
Anyways, considering what you should be using as a security model, the DHCP thing is really a minor issue in the larger picture, because FreeNAS shouldn't be deployed in a manner that would make this exploitable.
Having said that, let's circle around to those words you were trying to shove in my mouth. Here they are, in stronger form.
I damn well guarantee you that there are multiple unfixed remote code execution vulnerabilities in FreeNAS/TrueNAS. If you're wondering what they are, by all means, go look for them. Nobody's found them yet, but just like every other large scale modern software package, THEY EXIST.
You either plan for that eventuality, or you don't. Don't put all your eggs in the "fully patched" basket. Being fully patched is good. Planning for what happens when that isn't enough is better.