Yes it is possible to do a cache poisoning attack, and yes it is possible to protect yourself.
In addition to the rather standard practice of signing the package files with GPG, some distros use DNSSEC to protect the domains that serve those files against DNS spoofing.
Notice the 'ad' flag in the dns answer below:
$ dig +dnssec security.debian.org.
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> +dnssec security.debian.org.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23375
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 9, AUTHORITY: 4, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;security.debian.org. IN A
;; ANSWER SECTION:
security.debian.org. 300 IN A 212.211.132.250
security.debian.org. 300 IN A 128.31.0.36
security.debian.org. 300 IN A 128.61.240.73
security.debian.org. 300 IN A 128.101.240.212
security.debian.org. 300 IN A 149.20.20.6
security.debian.org. 300 IN A 195.20.242.89
security.debian.org. 300 IN A 200.17.202.197
security.debian.org. 300 IN A 212.211.132.32
security.debian.org. 300 IN RRSIG A 8 3 300 20140827233402 20140728233402 28626 security.debian.org. AF84GPGaVSMwLsTWP0vVJpW6E9r7PL1Pi/LTxGXPUt5x1AxeW8UKJ+wh OiB6tPy91sBRA5GfNofq+P3AhsWt2JGSR/iiN9qq6p6ryU6G5gQeZbYY MYVGDzf3j2z+kUMbsB902L/fPeJzLDxyaJzHPLU8alzs+4bvvKfd4SeA +MyGrckpFkr0Csi2LtRKGA5hJPrxFcHOFeWsY+n/mjAxy8g6SSdYrKVZ 3kk5G9sR1kKSiyHwxFVaIQXR0j1skl9/
;; AUTHORITY SECTION:
security.debian.org. 28800 IN NS geo1.debian.org.
security.debian.org. 28800 IN NS geo2.debian.org.
security.debian.org. 28800 IN NS geo3.debian.org.
security.debian.org. 28800 IN RRSIG NS 8 3 28800 20140827233402 20140728233402 28626 security.debian.org. TpTt53QAgOwwH38oqkfbm4F07j78VthQCzcHezN+N0+fPu0vXiatFMAI 1CBAFkYj/rkYNfv+xhM7OfvNgWMcRoMn9v7UOtMdxUOsjO2lQCVdjMsx TRz9OITY/NZWVD0/hkNXvpBVbsFW+y0JRzEb0xegHdGYHS1A9PVwRlCT 2DJLgkL6mS+RrOfteEDZD80HZZiiQcDLf1CgG6K2s5wNUIwsAzZdFEWC XnCXAguK3PVusvvnHz1i09B9qducyd+8
;; Query time: 2370 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jul 29 04:00:11 2014
;; MSG SIZE rcvd: 719
By default, debian (and AFAIK most other distros) will require the GPG signature to match.
If you want to take advantage of the DNSSEC protection on the domains that serve the package files, run a validating caching nameserver locally, such as unbound or bind.