News for hackers. Stuff that matters.
Re:My insulin pump controller has a bug by mtmail on Friday December 01, 2023 @06:24AM (#38485564)
Non-twitter link: https://nitter.net/morganherlocker/status/173045572181552742... (edit: I'm not the author)

"Notified today that my insulin pump controller has a bug where the leading decimal point will be dropped, ie: changing a dose of .21 units to 21 units. I can reproduce randomly ~1 in 5 times so probably a race condition. Easily one of the worst software bugs I have ever heard of."

Re:My insulin pump controller has a bug by sidewndr46 on Friday December 01, 2023 @08:28AM (#38486410)
wouldn't this put someone into a state of insulin shock?
Re:My insulin pump controller has a bug by wwilim on Friday December 01, 2023 @08:54AM (#38486648)
If you wanted 0.66 units and got 66 units, I am pretty sure you would die. I would count on the tissue around the infusion site not having enough throughput to release it all into your system at once and swelling up. This would mean the problem would spread over a few hours, but it would be an extreme emergency anyway.

To put it into perspective (at least with my insulin to carb ratio, it varies from person to person), if you wanted to drink a regular sized can of coke, you would dose 3.3u. 66u is therefore enough insulin for 20 cans of coke.

Another way to put it is that 10g of sugar ~ 1u of insulin. You'd have to eat 660g of raw sugar.

There is a medication called Glucagen which is used to treat severe hypo. It works by triggering release of stored glucose from the liver. The thing is, from what I've quickly googled, a typical 1mg dose is usually only enough to raise your blood sugar by about 100mg/dl, and then your store is depleted and further doses have no effect. With my insulin/carb ratio, I would only need about 2.5u to reduce my blood sugar by 100mg/dl.

All of a sudden it feels scary to think that the reservoir in my pump holds about 300u of insulin...

Re:My insulin pump controller has a bug by pixl97 on Friday December 01, 2023 @09:27AM (#38487036)
Heh, yea, this is why when I went to DEFCON I disconnected the feed to my body. I mean it's not likely someone's going to try to murder me via bluetooth, but why take the risk when I didn't have to.

In the days before I had a pump I did something similar to myself. I had a short acting insulin and long acting insulin both in pen form. Managed to give myself the large overnight dose which should have been the long acting with the short acting pen. After about 15 minutes I realized something was up when I felt the low coming on and spent the next 2 hours drinking a disgusting amount of orange juice.

Re:My insulin pump controller has a bug by jacquesm on Friday December 01, 2023 @10:11AM (#38487613)
At least you noticed!
Re:My insulin pump controller has a bug by mlsu on Friday December 01, 2023 @02:43PM (#38491254)
Why is it always orange juice?

I have had exactly the same experience. One glass of orange juice is great. 3/4 of a gallon.. not so much.

Re:My insulin pump controller has a bug by yankoff on Friday December 01, 2023 @08:39AM (#38486495)
It will drop the blood sugar level dangerously low and cause hypoglycemia. A person can lose consciousness, get into a coma, or even die.
Re:My insulin pump controller has a bug by jmrjmr on Friday December 01, 2023 @06:48AM (#38485740)
What brand/model?
Re:My insulin pump controller has a bug by patagurbon on Friday December 01, 2023 @07:30AM (#38485966)
Omnipod 5 when using the Android app as the controller
Re:My insulin pump controller has a bug by stranded22 on Friday December 01, 2023 @08:31AM (#38486421)
Ty - wife is T1D and waiting for closed loop with omnipod. Might wait a little longer…
Re:My insulin pump controller has a bug by yankoff on Friday December 01, 2023 @08:41AM (#38486518)
Damn, that's the one I'm using although with a separate controller. I've been looking forward for the iPhone app that is supposed to come out in 2024.
Re:My insulin pump controller has a bug by numpad0 on Friday December 01, 2023 @08:47AM (#38486597)
> using the Android app as the controller
Re:My insulin pump controller has a bug by auggierose on Friday December 01, 2023 @09:13AM (#38486866)
For software like that, not sure how anything other than formally proven correct software is acceptable. And note, no type system is gonna help you with a bug like that.
Re:My insulin pump controller has a bug by pciexpgpu on Friday December 01, 2023 @11:14AM (#38488383)
Theory meets practice. An automated theorem proves that knows about Android view hierarchy, Parcelables, Android kernel well really entirety of SELinux not to mention whatever Bluetooth firmware drivers seems quite a bit of boiling the ocean.

The actual device (not the app) does seem poorly engineered and not at all fail safe / provided with ‘might kill the patient’ error handling.

Seems like double whammy where an app and hardware conspire against its user.

Re:My insulin pump controller has a bug by auggierose on Friday December 01, 2023 @12:50PM (#38489764)
In a way you are right, but all that stuff (Android, Parcelables, Android kernel) is garbage. Time to replace all of that with a proper formally proven stack. It's not that Apple or Google don't have the money to do that. They just don't have the will, knowledge and engineers for that.
Re:My insulin pump controller has a bug by layer8 on Friday December 01, 2023 @09:17AM (#38486904)
With the right type system, any formal proof can be represented in it, and the type checker will verify the proof. Any fault that remains can also remain with a formal proof. Look up Curry–Howard isomorphism.
Re:My insulin pump controller has a bug by auggierose on Friday December 01, 2023 @09:20AM (#38486954)
Obviously I mean an ML-like type system with automatic inference. Otherwise it is just general logic, and you definitely don't need types for that.

And Curry-Howard is the most overrated isomorphism in history. It may make computer scientists head explode, but mathematicians can live without it.

And yes, I know that Lean is based on it, and Tao is using it, and he just doesn't know better. Sorry.

Re:My insulin pump controller has a bug by layer8 on Friday December 01, 2023 @09:22AM (#38486972)
Type inference is largely orthogonal to the question.

The point is, any formal proof you could do outside a type system you can also do within a type system, so yes the right type system would help you avoid such bugs.

Re:My insulin pump controller has a bug by auggierose on Friday December 01, 2023 @10:44AM (#38488066)
No, that's not the point. There is no point to a general type system without automatic type inference. Because otherwise, it's just a kind of cumbersome and cobbled together logic.
Re:My insulin pump controller has a bug by chlorion on Friday December 01, 2023 @02:47PM (#38491307)
I don't know very much about formal methods but I would assume the type system plays an important role for encoding that specific states can or cant exist.
Re:My insulin pump controller has a bug by asfarley on Friday December 01, 2023 @07:48PM (#38494649)
But a high reading is a state that can exist. I don’t really see how formal methods would exclude a multiplication/unit error with respect to the displayed unit.
Re:My insulin pump controller has a bug by e2le on Friday December 01, 2023 @09:17AM (#38486916)
It sounds like the bug was in the Android app. Shouldn't the microcontroller (on the pump) be validating dose values received?

(dose > MAX_DOSE) ? return DOSE_TOO_HIGH : return DOSE_ACCEPTED;

20 units is obviously dangerous for a single dose.

Re:My insulin pump controller has a bug by patagurbon on Friday December 01, 2023 @09:27AM (#38487034)
There is a max dose but it is a user setting. Mine is set to 25, since I would take about 20 if I ate a few slices of pizza for instance.
Re:My insulin pump controller has a bug by jrh3 on Friday December 01, 2023 @09:30AM (#38487065)
My same thought, Max Dose in an hour setting should prevent severe hypoglycemia as a fail safe, but I did not see anything mentioned in the article about that on Insulet website. My son has this model but we use controller that comes with it, not the Android app, which is where the issue is. Closed loop OmniPod 5/Dexcomm is a game changer for Type 1 management. As a software developer I worry about this sort of thing but hopefully max dose fail safe gets this.
Re:My insulin pump controller has a bug by jacquesm on Friday December 01, 2023 @09:21AM (#38486960)
Absolutely. The App should be considered hostile by the pump firmware until proven otherwise.
Re:My insulin pump controller has a bug by grayhatter on Friday December 01, 2023 @11:57AM (#38488986)
What you mean to say is completely correct. What you actually said is wrong, there's a huge delta between hostile and unproven. The pump firmware should assert it's own safety and sanity checks. Which is different from hostility.
Re:My insulin pump controller has a bug by jacquesm on Friday December 01, 2023 @12:09PM (#38489191)
You are making the assumption that the app is the real app and that the app is under the control of the user. Both may turn out not to be the case so 'hostile' would seem to me to be the only proper classification unless the communications have ways of verifying that either of the above scenarios is not in play. Better safe than sorry with this stuff.
Re:My insulin pump controller has a bug by chlorion on Friday December 01, 2023 @02:17PM (#38490933)
I think it should assume its hostile since physical harm could be done in the case of someone hijacking the app.

The users phone could be stolen, or the device compromised, or many other things. A compromised device should not be able to cause physical harm to a human!

edit: someone else already said basically the same thing but I didn't see it because I opened this tab a long time ago and didn't refresh it!

Re:My insulin pump controller has a bug by jacquesm on Friday December 01, 2023 @02:48PM (#38491329)
Np, happens to me all the time. I have a ton of tabs open and re-visit them during the day and I always forget to refresh first.
Re:My insulin pump controller has a bug by patagurbon on Friday December 01, 2023 @09:36AM (#38487130)
This is quite the overreaction. There is both a confirmation screen and a maximum bolus setting to ameliorate the issue until an OTA update can be provided.

Stranding users who use the app without access to our lifesaving medical device is... Bold, to say the least.

Re:My insulin pump controller has a bug by jacquesm on Friday December 01, 2023 @10:06AM (#38487540)
If you are a diabetic you should always have a plan B for your 'lifesaving medical device' because they can break. For instance:

https://www.northwoodsendocrinology.com/wp-content/uploads/2...

Presumably whoever provided you your pump has a similar instruction.

Risking using an app/pump combo that has a known flaw, especially a non-deterministic one is bold, to say the least. Safer to switch to the regular controller (assuming you have it) until this is fixed.

Re:My insulin pump controller has a bug by bradknowles on Monday December 04, 2023 @03:21AM (#38514921)
Therac-25 walks into the chat.

See: https://en.wikipedia.org/wiki/Therac-25