pargentum: (Default)
[personal profile] pargentum
Про то, как Микрософт тестировал самого себя (то есть Висту) на совместимость с Самбой:

Первая попытка Рэймонда Чена рассказать как оно все было
Вторая попытка, в которой признается, что речь идет про Самбу
Третья попытка - "дяденька, я не сварщик, я маску на улице нашел":
Sidebar: Some people have accused me of intentionally being misleading with the characterization of this bug. Any misleading on my part was unintentional. I didn't have all the facts when I wrote up that first article, and even now I still don't have all the facts. For example, FindNextFile using bulk queries? I didn't learn that until Tuesday night when I was investigating an earlier comment—time I should have been spending planning Wednesday night's dinner, mind you. (Yes, I'm a slacker and don't plan my meals out a week at a time like organized people do.)

Занятно, что до прямой дискуссии с Элисоном он так и не снизошел.

А вот другая сторона:

Первая попытка Джереми Элисона изложить свою версию событий

Вторая попытка, более детальная и более информативная в плане того, что же произошло:
So, let me explain *exactly* how this bug occurred, maybe it will illuminate the situation.

Microsoft commonly adds new info levels with each Windows release or service pack. They don't document these, they just appear.

Tridge has a protocol info level scanner as part of the smbtorture suite. This detects new info levels in the trans2 and nttrans SMB calls.

When we find a new info level we work out what it does and implement it as soon as possible - ususally a new info level appearing usually means that the client version of the Windows server version we tested against will start using the info level, so it's very important to get this implemented asap as new Windows clients will expect this info level to work against a server and the downgrading code in the client doesn't always work right. (We've seen that before in older versinos of the Windows redirector). If the new info level doesn't work right then applications may fail when running against a Samba server, and we of course get the blame.

tridge detected the new info levels and worked out what their internal structure was. He added test code to smbtorture to ensure that querying this info level  returned what we expected against a W2K3 server. Once we were sure that our analysis was correct we added it into the server code. We tested the code using the smbtorture analyser to ensure we were returning the correct data structure (so much for the claims we releas untested code).

The bug occurred when I only added the switch statements to field the incoming info level values into the SMBfindfirst code path, and forgot to add them into the SMBfindnext code path. The torture tester didn't find this case because it didn't test more than 100 files on this particular code path (it normally does when testing the directory scan code, but not specific info levels).

Since we've been aware of this problem tridge is adding such a coverage to smbtorture so we won't get this problem again.

We're also communicating with some of the Windows engineers and tridge has given a suggestion on how to fix this in the Windows implementation.

Jeremy Allison,
Samba Team.


Говоря короче и по русски:  Микрософт добавил новую фичу в SMB.  Фича сама по себе полезная, спору нет (запрашивать SMBfindnext пачками, а не по одному).  Как водится, нигде ее не документировали.  Самба тим обнаружили фичу, реверз инжинирнули как смогли, и реализовали.  Опять-таки как смогли.  Получилось криво, как это часто и бывает при реверз инжиниринге.

Микрософт протестировал фичу супротив самбы и понял, что она работает криво.  И встал на уши, потому что просто сказать про самбу "это ваши проблемы" они уже не могут.  А раскрыть самба тиму протокол тоже не могут - потому что понятно же, что если рассказывать самба тиму про каждую новую фичу, они ведь начнут распрашивать про старые фичи, например про schannel.  А если рассказать им про schannel, они же смогут ставить самбу в домен полноценным бэкапным или даже праймари контроллером - как после этого жить?  А не рассказать - так идиотами будем выглядеть.  Впрочем, они и так идиотами выглядят, в этом смысле им терять нечего...

А главная мораль - что SMB уже стал публичным протоколом.  А когда меняешь публичный протокол, то надо оповещать всех, кто его реализует, и давать им возможность потестировать то, что они нареализовали, против твоих тесткейзов.  Иначе идиотских ситуаций такого рода избежать, по видимому, невозможно.  А Микрософт, похоже, просто не понимает, как это так - работать с публичным протоколом. 

Profile

pargentum: (Default)
pargentum

January 2026

S M T W T F S
     1 2 3
4 5 6 7 8 9 10
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 11th, 2026 08:50 pm
Powered by Dreamwidth Studios