Skip to contentSkip to conversation

NULL pointer dereference in moxa driver

DISCUSSION Stephan von Krawczynski 4 participants 5 messages Dec 11, 2001 – Dec 12, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines

Stephan von Krawczynski <[email protected]> writes:
Seems I got somewhat closer now.

After reading the documentation again, I realised that I was

accessing

Quoted 7 lines

the wrong device.

I belive I read in another file, that the second board started at device 32. However device 8 is the first port on the second board.

And actually that seems to work. (I cant confirm this 100% before I get to work tomorrow and actually attach something to the port)

Well, this driver does only support 32 Ports. everyone more crashes definitely. I haven't seen such a broken source in years. I urge you to delete the device nodes above 31 to overcome any chance to crash again.

Most interestingly the moxa-driver is better by far than the mxser. It seems to me the mxser is _really_ old. If you want to help us all, please try to contact moxa support and tell them it is high time to submit a _new_ mxser.c to the kernel tree, because the old (currently used) one is such a mess. They can do better (proven in moxa.c). At least a multiboard setup is completely broken. My patch fixes this but this does not help the main kernel tree.

I cannot submit a patch to marcelo, because I am not the maintainer, and we all don't want to fork a new mxser-driver apart from the original.

Oh dear.

Regards,
Stephan

#2 lore raw
Quoted 2 lines

Most interestingly the moxa-driver is better by far than the mxser. It seems to me the mxser is _really_ old. If you want to help us all,

mxser, like the boards the moxa mxser driver supports is very old.

Quoted 3 lines

I cannot submit a patch to marcelo, because I am not the maintainer, and we all don't want to fork a new mxser-driver apart from the original.

There is no maintainer, and our code base has drifted a fair way from what moxa originally submitted (being a 2.0 driver with the serial transmit race bug).

Anyone who wants to beat the mxser driver into shape, go for it.

#3 lore raw
Quoted 5 lines

There is no maintainer, and our code base has drifted a fair way from what moxa originally submitted (being a 2.0 driver with the serial transmit race bug).

Anyone who wants to beat the mxser driver into shape, go for it.

I'm using it under 2.4.x, but I missed the rest of this thread - what are the issues?

#4 lore raw
Quoted 1 line
Quoted 1 line

There is no maintainer, and our code base has drifted a fair way

from what

Quoted 1 line
Quoted 1 line

moxa originally submitted (being a 2.0 driver with the serial

transmit race

Quoted 5 lines
Quoted 3 lines

bug).

Anyone who wants to beat the mxser driver into shape, go for it.

I'm using it under 2.4.x, but I missed the rest of this thread -

what are

Quoted 1 line

the issues?

Ok. Short summary (on mxser, moxa is different):

- multiple board support is broken
- driver blows up on illegal device minor numbers opened
- no security checks whatsoever on internal array overflows
- Completely broken port-number setup
- No visible NULL-pointer checks regarding dynamic structures

It looks like original taiwanese work: it is usable, but there are so many dead ends in this code, you won't believe - and I did only look some few minutes on it.

It desperately needs cleanup.

Listen Tim, if you want to do it, I can help you. But keep in mind, I have no hardware. So I am probably not the right guy for maintenance. If you do not feel comfortable, I will try it.

Regards,
Stephan

#5 lore raw
In reply to Alan Cox
Quoted 4 lines · Alan Cox
Quoted 2 lines

Most interestingly the moxa-driver is better by far than the mxser. It seems to me the mxser is _really_ old. If you want to help us all,

mxser, like the boards the moxa mxser driver supports is very old.

Those boards are still sold though. We bought ours quite recently.

At least they both work now, with Stephan's patch applied.

Signature · 2 lines
Best regards
    Christian Laursen