** Description changed: + [ Impact ] + + The library fails to operate; attempting to instantiate an SMBus object + crashes. + + [ Test plan ] + + On an appropriate platform (e.g. a Raspberry Pi) running a 64-bit arch: + + * sudo apt install python3-smbus2 + * python3 + * from smbus2 import SMBus + * bus = SMBus(1) + * Observe buffer overflow error + * Enable proposed + * sudo apt install -t resolute-proposed python3-smbus2 + * Repeat test and observe bus creation now works + + Repeat test on 32-bit arch as well (failure should not occur on either + original or proposed version). Probably easiest using an armhf container + under LXD, but will require exposing the /dev/i2c-* interface to the + container. + + [ Where things could go wrong ] + + Given the library in its current state fails to even instantiate the + bus, it can't regress much further on 64-bit. Still, there is a + possibility the fix could regress function on 32-bit, hence the test + plan covers this case. + + [ Original description ] + On 64-bit platforms, smbus2 assumes ioctl I2C_FUNCS needs a pointer to a 32-bit value, but it actually needs an unsigned long, which is 64-bit on arm64. This causes a buffer overflow in Python 3.14 which has stricter checks.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2152101 Title: [SRU] Buffer overflow in _get_funcs To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/smbus2/+bug/2152101/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
