For example, would a touchscreen device that uses the below pins on a Raspberry Pi 3 be able to do something more than say, send touch and keyboard events? Anything hackish/nefarious? (edit: use case: just concerned about how careful I should be trusting shield-like peripherals or not... on the computer for example one might be careful about trusting USB, and am wondering if attack vectors are opened depending on the default configuration of the GPIO or alternative protocols through the pins (e.g. what drivers deal with the pins by default)):
PWR o o PWR I2C1 SDA / GPIO 2 o o PWR . . . . . . . . . . . . . . SPI0 MOSI / GPIO 10 o o GND SPI0 MISO / GPIO 9 o o GPIO 25 SPI0 SCLK / GPIO 11 o o GPIO 8 / SPI0 CS0 GND o o GPIO 7 / SPI0 CS1 . . . . . . . . . . . . . .
Are the alternate functions enabled / autodetected by default, and could those functions like SPI MOSI/MISO be used nefariously, or I2C1 SDA?
If not, do the GPIO pins have any default functionality that can be abused by malicious peripherals?